/ecom125

Primary LanguageJavaScript

Commands

php artisan commands

php artisan
php artisan route:list
php artisan make:controller HomeController --invokable
php artisan storage:link
php artisan tinker
> storage_path()
php artisan queue:table

compser commands commands


Spatie Multi-tenancy installion commands

php artisan migrate --path=database/migrations/landlord --database=landlord
php artisan tenants:artisan "migrate:fresh --seed" 
php artisan tenants:artisan "db:seed --class=SetupSeeder"

Laravel PHP Commands

Storage file system

$request->image->store(/);
$request->image->storeAs(/, 'image.jpg');
// image folder is: storage/app/public BUT call as:
// You can change storge path from config/filesystem.php
{{asset('/storage/images/image.jpg')}} 

// Delete file
Storage::delete('/storage/images/image.jpg'); // for storage folder
Storage::disk('public)->delete('/storage/images/image.jpg'); // for public folder
Storage::disk('local)->delete('/storage/images/image.jpg'); //for local disk

// Also can delete using 
Fill::delete(storage_path('/app/public/images/image.jpg)); // if file system is storage folder

// or use
unlik(storage_path('/app/public/images/image.jpg));

Laravel section titles importants

  1. Sinagle Actions controllers (26)
  2. Stop CRF token protection (28)
  3. Format form errors in bootstrap (29)
  4. Factories (58)
  5. Many to Many Relationship (62)
  6. File Storage (63)
  7. Store file in storage (65)
  8. Storage linke (66)
  9. Returning file ti download (71)
  10. Laravel-Bootstrap Pagination: (87)
  11. $${\color{green} Laravel-Bootstrap Pagination: (87)}$$
  12. $${\color{green} Blade componants: (94-98)}$$
  13. $${\color{green} Sending email: (99-102)}$$
  14. $${\color{green} Laravel Cache: (108-114)}$$
  15. $${\color{green} Queues (127-129)}$$

Issues

1- VS code php Errors

PHP Installation could not be found

1- VS code php Errors

  1. Check you php verision
  2. Open vs code settings
  3. Edit settings in json
  4. Open vs code settings