laravel-crud | Basic CRUD Operation with Laravel and AdminLTE in Single | DB Client library
kandi X-RAY | laravel-crud Summary
kandi X-RAY | laravel-crud Summary
Basic CRUD Operation with Laravel and AdminLTE in Single Page
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create all categories .
- Update category .
- Handle user authentication .
- Create new user .
- Define routes .
- Register commands .
- Render the template .
- Register plugin .
- run the database table
- Migrate users .
laravel-crud Key Features
laravel-crud Examples and Code Snippets
Community Discussions
Trending Discussions on laravel-crud
QUESTION
I was following this tutorial, but with my own dataset: https://www.positronx.io/php-laravel-crud-operations-mysql-tutorial
And I got stuck on the phase of Creating and storing data.
When I comment use HasFactory it's showing this
Please help!
...ANSWER
Answered 2020-Dec-27 at 16:12The HasFactory
trait wasn't introduced until Laravel 8x. That's also when they moved all the models into the app/Models
directory.
I'm guessing that you're on Laravel 7x (or earlier), which does not have the HasFactory
trait, and where all the models are stored in the app
directory by default.
If you want to follow that tutorial, you'll want to start with a Laravel 8x application. If you want to stay on 7x, you'll need to adjust some things to work in 7x. For example, delete the use
statement for the HasFactory
trait. Additionally, your models are probably in the App
namespace, not the App\Models
namespace.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install laravel-crud
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page