Reputation: 2241
On laravel site I have installed api-platform with success :
hoster@hoster-os:/Project$ composer require api-platform/laravel
./composer.json has been updated
Running composer update api-platform/laravel
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Writing lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
INFO Discovering packages.
barryvdh/laravel-debugbar ................................................................................................................... DONE
hisorange/browser-detect .................................................................................................................... DONE
laravel/breeze .............................................................................................................................. DONE
laravel/octane .............................................................................................................................. DONE
laravel/pulse ............................................................................................................................... DONE
laravel/sail ................................................................................................................................ DONE
laravel/telescope ........................................................................................................................... DONE
laravel/tinker .............................................................................................................................. DONE
livewire/livewire ........................................................................................................................... DONE
livewire/volt ............................................................................................................................... DONE
mews/purifier ............................................................................................................................... DONE
nesbot/carbon ............................................................................................................................... DONE
nunomaduro/collision ........................................................................................................................ DONE
nunomaduro/termwind ......................................................................................................................... DONE
omnia-digital/livewire-calendar ............................................................................................................. DONE
sentry/sentry-laravel ....................................................................................................................... DONE
spatie/eloquent-sortable .................................................................................................................... DONE
spatie/laravel-backup ....................................................................................................................... DONE
spatie/laravel-collection-macros ............................................................................................................ DONE
spatie/laravel-data ......................................................................................................................... DONE
spatie/laravel-feed ......................................................................................................................... DONE
spatie/laravel-health ....................................................................................................................... DONE
spatie/laravel-livewire-wizard .............................................................................................................. DONE
spatie/laravel-permission ................................................................................................................... DONE
spatie/laravel-signal-aware-command ......................................................................................................... DONE
spatie/laravel-tags ......................................................................................................................... DONE
spatie/laravel-translatable ................................................................................................................. DONE
spatie/php-structure-discoverer ............................................................................................................. DONE
vedmant/laravel-feed-reader ................................................................................................................. DONE
willvincent/feeds ........................................................................................................................... DONE
wire-elements/modal ......................................................................................................................... DONE
132 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> @php artisan vendor:publish --tag=laravel-assets --ansi --force
INFO Publishing [laravel-assets] assets.
Copying directory [vendor/laravel/telescope/public] to [public/vendor/telescope] ............................................................ DONE
No security vulnerability advisories found.
But I got error with install command :
hoster@hoster-os:/Project$ php artisan api-platform:install
ERROR There are no commands defined in the "api-platform" namespace.
Checking all artisan commands I do not see any "platform" commands :
hoster@hoster-os:/Project$ php artisan
Laravel Framework 11.26.0
Usage:
command [options] [arguments]
Options:
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
--env[=ENV] The environment the command should run under
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
about Display basic information about your application
clear-compiled Remove the compiled class file
completion Dump the shell completion script
db Start a new database CLI session
docs Access the Laravel documentation
down Put the application into maintenance / demo mode
env Display the current framework environment
help Display help for a command
inspire Display an inspiring quote
list List commands
migrate Run the database migrations
optimize Cache framework bootstrap, configuration, and metadata to increase performance
serve Serve the application on the PHP development server
test Run the application tests
tinker Interact with your application
up Bring the application out of maintenance mode
auth
auth:clear-resets Flush expired password reset tokens
backup
backup:clean Remove all backups older than specified number of days in config.
backup:list Display a list of all backups.
backup:monitor Monitor the health of all backups.
backup:run Run the backup.
breeze
breeze:install Install the Breeze controllers and resources
cache
cache:clear Flush the application cache
cache:forget Remove an item from the cache
cache:prune-stale-tags Prune stale cache tags from the cache (Redis only)
channel
channel:list List all registered private broadcast channels
config
config:cache Create a cache file for faster configuration loading
config:clear Remove the configuration cache file
config:publish Publish configuration files to your application
config:show Display all of the values for a given configuration file or key
data
data:cache-structures Cache the internal data structures
db
db:monitor Monitor the number of connections on the specified database
db:seed Seed the database with records
db:show Display information about the given database
db:table Display information about the given database table
db:wipe Drop all tables, views, and types
debugbar
debugbar:clear Clear the Debugbar Storage
env
env:decrypt Decrypt an environment file
env:encrypt Encrypt an environment file
event
event:cache Discover and cache the application's events and listeners
event:clear Clear all cached events and listeners
event:list List the application's events and listeners
health
health:check Run all health checks
health:list List all health checks
health:queue-check-heartbeat
health:schedule-check-heartbeat
install
install:api Create an API routes file and install Laravel Sanctum or Laravel Passport
install:broadcasting Create a broadcasting channel routes file
key
key:generate Set the application key
lang
lang:publish Publish all language files that are available for customization
livewire
livewire:attribute Create a new Livewire attribute class
livewire:configure-s3-upload-cleanup Configure temporary file upload s3 directory to automatically cleanup files older than 24hrs
livewire:copy Copy a Livewire component
livewire:delete Delete a Livewire component
livewire:form Create a new Livewire form class
livewire:layout Create a new app layout file
livewire:make Create a new Livewire component
livewire:move Move a Livewire component
livewire:publish Publish Livewire configuration
livewire:stubs Publish Livewire stubs
livewire:upgrade Interactive upgrade helper to migrate from v2 to v3
make
make:cache-table [cache:table] Create a migration for the cache database table
make:cast Create a new custom Eloquent cast class
make:channel Create a new channel class
make:class Create a new class
make:command Create a new Artisan command
make:component Create a new view component class
make:controller Create a new controller class
make:data Create a new data class
make:enum Create a new enum
make:event Create a new event class
make:exception Create a new custom exception class
make:factory Create a new model factory
make:interface Create a new interface
make:job Create a new job class
make:job-middleware Create a new job middleware class
make:listener Create a new event listener class
make:livewire Create a new Livewire component
make:mail Create a new email class
make:middleware Create a new HTTP middleware class
make:migration Create a new migration file
make:model Create a new Eloquent model class
make:notification Create a new notification class
make:notifications-table [notifications:table] Create a migration for the notifications table
make:observer Create a new observer class
make:policy Create a new policy class
make:provider Create a new service provider class
make:queue-batches-table [queue:batches-table] Create a migration for the batches database table
make:queue-failed-table [queue:failed-table] Create a migration for the failed queue jobs database table
make:queue-table [queue:table] Create a migration for the queue jobs database table
make:request Create a new form request class
make:resource Create a new resource
make:rule Create a new validation rule
make:scope Create a new scope class
make:seeder Create a new seeder class
make:session-table [session:table] Create a migration for the session database table
make:test Create a new test class
make:trait Create a new trait
make:view Create a new view
make:volt Create a new Volt component
migrate
migrate:fresh Drop all tables and re-run all migrations
migrate:install Create the migration repository
migrate:refresh Reset and re-run all migrations
migrate:reset Rollback all database migrations
migrate:rollback Rollback the last database migration
migrate:status Show the status of each migration
model
model:prune Prune models that are no longer needed
model:show Show information about an Eloquent model
octane
octane:install Install the Octane components and resources
octane:reload Reload the Octane workers
octane:start Start the Octane server
octane:status Get the current status of the Octane server
octane:stop Stop the Octane server
optimize
optimize:clear Remove the cached bootstrap files
package
package:discover Rebuild the cached package manifest
permission
permission:cache-reset Reset the permission cache
permission:create-permission Create a permission
permission:create-role Create a role
permission:setup-teams Setup the teams feature by generating the associated migration.
permission:show Show a table of roles and permissions per guard
pulse
pulse:check Take a snapshot of the current server's pulse
pulse:clear [pulse:purge] Delete all Pulse data from storage
pulse:restart Restart any running "work" and "check" commands
pulse:work Process incoming Pulse data from the ingest stream
queue
queue:clear Delete all of the jobs from the specified queue
queue:failed List all of the failed queue jobs
queue:flush Flush all of the failed queue jobs
queue:forget Delete a failed queue job
queue:listen Listen to a given queue
queue:monitor Monitor the size of the specified queues
queue:prune-batches Prune stale entries from the batches database
queue:prune-failed Prune stale entries from the failed jobs table
queue:restart Restart queue worker daemons after their current job
queue:retry Retry a failed queue job
queue:retry-batch Retry the failed jobs for a batch
queue:work Start processing jobs on the queue as a daemon
route
route:cache Create a route cache file for faster route registration
route:clear Remove the route cache file
route:list List all registered routes
sail
sail:add Add a service to an existing Sail installation
sail:install Install Laravel Sail's default Docker Compose file
sail:publish Publish the Laravel Sail Docker files
schedule
schedule:clear-cache Delete the cached mutex files created by scheduler
schedule:interrupt Interrupt the current schedule run
schedule:list List all scheduled tasks
schedule:run Run the scheduled commands
schedule:test Run a scheduled command
schedule:work Start the schedule worker
schema
schema:dump Dump the given database schema
sentry
sentry:publish Publishes and configures the Sentry config.
sentry:test Generate a test event and send it to Sentry
storage
storage:link Create the symbolic links configured for the application
storage:unlink Delete existing symbolic links configured for the application
structure-scouts
structure-scouts:cache Cache discoverers within your application
structure-scouts:clear Clear cached discoverers within your application
stub
stub:publish Publish all stubs that are available for customization
telescope
telescope:clear Delete all Telescope data from storage
telescope:install Install all of the Telescope resources
telescope:pause Pause all Telescope watchers
telescope:prune Prune stale entries from the Telescope database
telescope:publish Publish all of the Telescope resources
telescope:resume Unpause all Telescope watchers
vendor
vendor:publish Publish any publishable assets from vendor packages
view
view:cache Compile all of the application's Blade templates
view:clear Clear all compiled view files
volt
volt:install Install all of the Volt resources
In composer.json :
{
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": [
"laravel",
"framework"
],
"license": "MIT",
"require": {
"php": "^8.2",
"api-platform/laravel": "*",
"bugsnag/bugsnag-laravel": "^2.0",
"danharrin/livewire-rate-limiting": "^1.3",
"hisorange/browser-detect": "^5.0",
"intervention/image": "^3.7",
"laravel/breeze": "^2.1",
"laravel/framework": "^11.9",
"laravel/octane": "^2.5",
"laravel/pulse": "^1.2",
"laravel/telescope": "^5.0",
"laravel/tinker": "^2.9",
"livewire/livewire": "^3.5",
"livewire/volt": "^1.6",
"mews/purifier": "^3.4",
"omnia-digital/livewire-calendar": "^3.1",
"predis/predis": "^2.2",
"sentry/sentry-laravel": "^4.7",
"spatie/cpu-load-health-check": "^1.0",
"spatie/laravel-backup": "^8.8",
"spatie/laravel-data": "^4.7",
"spatie/laravel-feed": "^4.4",
"spatie/laravel-health": "^1.29",
"spatie/laravel-livewire-wizard": "^2.3",
"spatie/laravel-permission": "^6.7",
"spatie/laravel-sluggable": "^3.6",
"spatie/laravel-tags": "^4.6",
"spatie/security-advisories-health-check": "^1.2",
"vedmant/laravel-feed-reader": "^1.6",
"willvincent/feeds": "^2.6",
"wire-elements/modal": "^2.0"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.13",
"fakerphp/faker": "^1.23",
"laravel/pint": "^1.13",
"laravel/sail": "^1.26",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.0",
"phpstan/phpstan": "^1.12",
"phpunit/phpunit": "^11.0.1"
},
"autoload": {
"files": [
"app/Library/helper.php"
],
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi",
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
"@php artisan migrate --graceful --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "stable",
"prefer-stable": true
}
hoster@hoster-os:/Project$ php -v
PHP 8.2.21 (cli) (built: Jul 4 2024 16:26:28) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.21, Copyright (c) Zend Technologies
with Zend OPcache v8.2.21, Copyright (c), by Zend Technologies
with Xdebug v3.3.2, Copyright (c) 2002-2024, by Derick Rethans
hoster@hoster-os:/Project$ uname -a
Linux hoster-os 6.5.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 7 09:00:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Reading manuals
Thanks in advance!
Upvotes: 0
Views: 73