I have small problems with queries in Laravel. I have that file in project/app/file.php, and inside of file I have something like this:
class Trip extends Model implements TranslatableInterface
{
use Translatable;
use Concerns\HasMeta;
use Concerns\HasActionLinks;
protected $guarded = [
'id'
];
const EDIT_PATH = 'extranet/trips';
/**
*
* @var string
*/
protected $table = 'trips';
protected static $translatable = [];
/**
*
* @param mixed $query
* @param array $filters
* @return void
*/
}
How can I query this protected $table = 'trips';
?
blade example:
@foreach($trips as $k => $trip)
<div class="list-group-item planner">
@include('components.scratchpad_trip')
</div>
@endforeach
Edit:
Finally I found the controller. What to write to select title where 'Amsterdam'?
$trips = $this->getTrips();
$results = $this->getCombinations();
Read about Laravel Eloquent basics. In your case you can write $trips = Trip::all()
if you want to select all trips.