Questions tagged [laravel-views]

69 questions
1
vote
1 answer

How to create a template view table tag without repeating table tags on every file

I'm developing a system which has many tables so I have to repeat the writing of table tags on all the files which display a table Here is what I'm doing on every file which have to display table On Countries table:
antweny
  • 67
  • 2
  • 10
1
vote
1 answer

Index method on controller is called, but not used in controller

I'm working on a Laravel project, and I am running into a problem where I can't get my index page to work without throwing a 404 error. I'm working on an amateur authoring website, which has a database of stories - the user can either upload a text…
AgentNo
  • 231
  • 5
  • 20
1
vote
1 answer

Removing HTML Tags from meta property in Laravel directly in views

I am a loading a variable in Laravel which has some paragraph tags for the meta property"og:description". Is there a way I can remove the paragraph tag directly from the views>x.blade.php Example:

Hello Work

should appear as: Hello…
Rutnet
  • 1,533
  • 5
  • 26
  • 48
1
vote
1 answer

Javascript::put() or return view('index', compact($data))

Please look into my controller class myController extends Controller { $markets = Market::all(); \JavaScript::put([ 'markets' => $markets, ]); return view('test.index'); } Using this method, I can get…
Sandeep Sudhakaran
  • 1,072
  • 2
  • 9
  • 22
1
vote
5 answers

Laravel views using with() method

I want to pass data to Laravel view and do not understand certain parameters within the with() method. What parameter name refer to? return view('pages.about')->with('name', $name);
1
vote
1 answer

Pass variables to multiple view in laravel

I want to pass a variable to multiple view bu when i use share method in View. Its says the share method isn't find on View. How you say i use it and i try the composer either but no matter how i try it can't work could you give me simple example of…
1
vote
1 answer

how to set values from table in laravel blade

I'm working on displaying currency list from table in dropdown in laravel blade. In the dropdown option i want to set first value currency as set in csv file. but dropdown records are from table. how do i set first value in dropdown as set in…
1
vote
1 answer

call controllers on different sections of my views in laravel 5.5

i want to call multiple controller routs from my views and show their data in different sections of my site. x
1
vote
3 answers

How to pass model data inside foreach loop to views using laravel5

I have a foreach loop where each time certain value is matched and then it related records is fetched foreach($results as $result){ // Value may be 1,2,3 etc if($result->id == $value){ $users = User::whereId($value)->get(); } …
Khirad Zahra
  • 843
  • 2
  • 17
  • 42
1
vote
3 answers

change format of date input field in laravel

I have a date input field in laravel. I want the date format to be "D/M/Y". This gets the today's date but i want to be in correct format and when selecting a date. {{Form::date('name', \Carbon\Carbon::now(), array('class' => 'form-control',…
steven
  • 147
  • 1
  • 4
  • 12
1
vote
1 answer

How to set views folder destination during runtime in laravel

I'm trying to build a saas application (saas here means software as a service) in laravel 5.3. I'm trying to implement the view folder destination by extending the ViewServiceProvider. For example I'm having two different themes for two different…
Nitish Kumar
  • 6,054
  • 21
  • 82
  • 148
1
vote
1 answer

ErrorException in IncomesController.php line 45: Undefined variable: type_id

This is the error it gives me back when i try to submit a new Income. I'm new on Laravel 5.3 so i have a lot of errors specially on FK and relationships; be free to point it out. And to point out i already have 3 entries of types, and i can both see…
0
votes
2 answers

Chunk data and Display with header in Laravel view

I have data that I need to display in 3 rows with header in Laravel blade view.I know there is chunk method in Laravel to chunk the data and display.But I want to diplay data in different way. Here is my data Illuminate\Support\Collection {#1898…
simpson
  • 67
  • 8
0
votes
1 answer

Laravel resource index listing limited amount of records

I have two resources Organizations OrganizationUsers (which has FK to Users on user_id) The User model class User extends Authenticatable { use Notifiable; /** * The attributes that are mass assignable. * * @var array …
0
votes
2 answers

Laravel Blade: How to loop multidimensional array in view?

I have the below arrays and I want to get it in laravel blade as HTML table. array:2 [▼ 0 => array:6 [▼ "room" => "401" "landmark" => "Main Building" "capacity" => 60 "faculty" => array:4 [▼ 0 =>…
Shaikhul Saad
  • 177
  • 2
  • 2
  • 12