Category: Artisan Command
-
Post Views: 59 1. When executing the command composer update –ignore-platform-reqs, an error is reported: script @php artisan package:discover –ansi handling the Post-autoload-dump event returned with error code 255. as shown in Figure 1 2. Why the option –ignore-platform-reqs is added when executing the composer update command. The reason is that when executing composer update, an error is reported: it…
-
Post Views: 21 1. Reference URL:https://www.shuijingwanwq.com/2021/12/29/5622/, Laravel 8.x is deployed to Heroku, based on PostgreSQL implementation. Therefore, some steps can be omitted. 2. In the local development environment, the Laravel native environment has been deployed. Open URL:http://larabbs.local/, the response 200. as shown in Figure 1 3. Verify your installation, to verify your CLI installation, use the heroku –version command. Current…
-
Post Views: 15 1. Error when adding foreign key constraints: sqlstate[23000]: Integrity Constraint Violation: 1452 cannot add or update a child row: a foreign key constraint fails . as shown in Figure 1 2. Analyze the reason, the record of the user ID equal to 9 exists in the topics, but it no longer exists in users. as shown in…
-
Post Views: 14 1. When executing the command: php artisan larabbs:calculate-active-user, an error is reported: classredisnot found. as shown in Figure 1 2. The cache is used in this command, and redis is used as the cache driver. Edit the .dev file and add: redis_client=predis 3. Execute the command again: php artisan larabbs:calculate-active-user, no more errors are reported. as shown…
-
Post Views: 15 1. Execute the command: Sail Artisan migrate, report an error: chmod(): operation not permitted. as shown in Figure 1 2. Run the following command to reload the file: Sail composer dump-autoload, report an error: in filesystem.php line 207: chmod(): operation not permitted. script @php artisan package:discover –ansi handling the post-autoload-dump event returned with error code 1. as…
-
Post Views: 15 1. Laravel 8.x is deployed to Heroku, and when the database data filling is executed, an error is reported: class “faker\factory” not found. as shown in Figure 1 2. Edit composer.json , copy “fakerphp/faker” in “require-dev” to “require”. as shown in Figure 2 3. If there is a program that may affect the running of the local…
-
Post Views: 19 1. Execute the command line in Windows 10 and report an error: Call to undefined function App\Console\Commands\POSIX_Getpid(). as shown in Figure 1 2. Reference URL:https://www.php.net/manual/zh/intro.posix.php. This extension is not available on Windows platforms. You can also try using getMyPid() instead. as shown in Figure 2 3. POSIX_GETPID — Returns the current process ID. Decide to replace with:…