user2725587
user2725587

Reputation: 115

Laravel how to use isset $_GET

I want display the layouts.layout if the value of $_GET['actionboard'] isset, I mean If the actionboard value is got it should display the layouts.layouts.

How can i do this in laravel way.

<?php if(isset($_GET['actionboard'])){ ?>
@extends('layouts.layouts')
@section('body')
<?php } ?>

Upvotes: 0

Views: 609

Answers (1)

Rupert
Rupert

Reputation: 1639

Pass the Input reference to the view like this:

//In your controller
View::share('actionboard', Input::get('actionboard'));

Then use the variable in the view:

//In your view
<?php if($actionboard){ ?>
@extends('layouts.layouts')
@section('body')
<?php } ?>

Upvotes: 1

Related Questions