Support the ongoing development of Laravel.io →
Views Blade Installation
Last updated 2 years ago.
0

to make things simple and for the sake of readability, i would refactor your code like this

public function returnView($data = []){
	return view('profile', array_merge([
		'csspath' => $this->css,
		'lastname' => $this->last_name
		...
		...
	], $data));
}

protected function newAddressBook(Request $request)
{
 	return $this->returnView([
 		'extra_data' => 'this is extra data '
 	]);
}
0

Sign in to participate in this thread!

Eventy

Your banner here too?

irexjr irexjr Joined 10 Mar 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.