It is all about convention that Laravel used. For reference please check this documentation


Laravel use “snake case” and plural name of the class as a convention.

For example

Snake Case: Model: FlightControl Table: flight_control
Plural Name: Model: Flight Table: flights

So in that Flight model case for example, Laravel will find a table named flights to perform CRUD operations. If your table dont have the table then Laravel will throw an error.

If you use a table thats is not snake case or plural version of the Model Name you have to specify it with a protected property.

For example if you have a model Flight and your table is named travel you can do this


namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class Flight extends Model
* The table associated with the model.
* @var string
protected $table = ‘flights’;