Final Project Part 2 (Questionnaire/Survey App)
For a final project on this course, let's build an App for creating questionnaires (surveys). In part 2, we are answering one of the most frequent questions that I get, how to save from 1 form to multiple tables at once.
Final Project Part 1 (Questionnaire/Survey App)
For a final project on this course, let's build an App for creating questionnaires (surveys). In part 1, we are setting up the table that will hold the questionnaires and coding the relationships of hasMany and belongsTo for the user. We will also touch on how to save through the relationship.
MySQL Where Clause with Eloquent
When fetching records from the database, most of the time you need to grab a subset of records and not your entire database. This is done using a where clause. Let's add that to our app in this lesson.
At times, you need your application to keep records in the database but still make them disappear from functionality. That's where soft deletes come into play. They allow you to complete hide a record from the database without actually deleting the record. Let's take a look at an example.
MySQL Database & SQLite
Let's get the basics of working with a database in Laravel by setting up a MySQL database from scratch. Let's also create a migration and a model for our services. To wrap it up, let's change to a SQLite database to show how simple it is.