Blade returns undefined offset
The error point out that there was a issue while compiling blade file possibly because of syntax error. So, just wrap the foreach variable inside paranthesis and the issue should be fixed.
@extends('public.layout')
@section('content')
Companies
@foreach ($companies as $company)
{{ $company->title }}
@endforeach
@stop