public function services() {
$data = [
'title' => 'langs',
'languages' => ['PHP', 'Java', 'Python']
];
return view('pages/services')->with($data);
}
Receive the passed array@extends('layouts.app')
@section('cntnt')
<h3>{{$title}}</h3>
@if(count($languages))
@foreach($languages as $language)
<li>{{$language}}</li>
@endforeach
@endif
@endsection