Reputation: 1
i am new in programing laravel. so here I will not ask about my problems but I am here just want to ask how to use laravel. here I would like to ask how to use:
Determining If an Input Value Is Present in laravel. and what it does?
thanks ^^
Upvotes: 0
Views: 113
Reputation: 1544
Laravel is really a good MVC Framework. I can suggest you some source from where you can get better understanding of Laravel Framework.
For simple example - How to use Laravel after installation
php artisan make:controller TestController
testGet()
and return view - return view('test.index');
//test is directory and index is file testPost(Request $request)
and to get data use $data = $request->all();
and then print this data.php artisan make:model Test --migration
Route::get('/test', 'TestController@testGet');
Route::post('/test', 'TestController@testPost');
Now check GET request to your project http://project/test it will call testGet function. POST request http://project/test?name=Adam will call testPost function and will print your name.
Upvotes: 2
Reputation: 6279
as said in the comments you better check laracasts! its the laravel school anyway to anwser your question, its simple
View
<input type="text" name="fname">
Controller
public function doingstuff (Illuminate\Http\Request $request) {
if ($request->has('fname')) {
// a man gotta do what a man gotta do here
}
}
smooth huh? :3
Upvotes: 0