Answers for "how to send data to controller using get method laravel"

PHP
5

laravel send post request from controller

use Illuminate\Support\Facades\Http;

$response = Http::post('http://example.com/users', [
    'name' => 'Steve',
    'role' => 'Network Administrator',
]);

// By default, data will be sent using the application/json content type
Posted by: Guest on February-26-2021
1

how to pass data to controller in laravel

$dept = DB::table('master_department')->get();
$design = DB::table('master_designation')->get();
return view('registration', ['dept' => $dept], compact('design'));

#if we send as array
@foreach($dept as $key=>$d)
	{{ $dept[$key]->dept_title }}
@endforeach

#if we send as compact object
@foreach($design as $deg)
	<option value="{{ $deg->id }}">{{ $deg->deg_title }}</option>							
@endforeach
Posted by: Guest on February-03-2021

Code answers related to "how to send data to controller using get method laravel"

Browse Popular Code Answers by Language