I needed to make an Eloquent query that could take search terms. The search terms are optional – no search term and the whole dataset is returned. In our particular data model the Users have one or many Associations. So the search term should check for user name, phone, email and association name. In the… Read More »
Create migration in console: Use Schema::table() to access existing table (instead of Schema::create() for creating new tables) Then run migrations:
Different ways of getting a single model and checking if it’s there.