Category : database

Im new to laravel and I cant seem to download the pdf of my blade php file. Please help me out! Thank you! This is what I get If i click my "Export to PDF" button in my productlist.blade.php: ErrorException Undefined variable: products (View: C:xampphtdocslaravelproductcrudresourcesviewsproductlist.blade.php) This is my product controller file: <?php namespace AppHttpControllers; use ..

Read more

Yo dudz! So… I’m new to laravel and trying to get information from many tables. As a perfectionist freak I am, I can’t go for a join or for a model relationship at this one, I kinda have a problem with both. I have a table PATIENTS that has foreign key status_id. the STATUSES table ..

Read more

I want to build a kind of frame for backend and get joins as an array and execute that join something like below : function anEloquentFunction() { return $classObject::select(‘count(*) as allcount’) ->join(function ($query) { switch (isset($this->joins) && !empty($this->joins) && is_array($this->joins)) { case true: foreach ($this->joins as $join) { switch ($join[‘type’]) { case ‘left’: $query = ..

Read more

I Want to extract data from 4 tables . like sname,cgpa,Group_Cgpa,Room_No and Hostel Name. Relation of table is as follows. AllotmentApps has : id,sname,cgpa and grpID (from Group id Table) columns. Groups has : id,Group_CGPA Room has : id, HostelID (From Hostel) and ResidentID (From Group id). Hostels has: id, Name, Total_Rooms. I’m facing problem ..

Read more

i have a form to store image in database but i get error "Call to a member function getClientOriginalExtension() on null" my form.blade.php <form method="POST" action="{{ ‘/admin/data/list’ }}" enctype="multipart/form-data"> @csrf <div class="form-group"> <label for="gambar">Gambar Berita</label> <div class="input-group"> <input type="file" name="gambar" id="gambar"> </div> @error(‘gambar’) <div class="alert alert-danger"> {{ $message }} </div> @enderror </div> </div> <!– /.card-body ..

Read more

please help my… [enter image description here][1] please help me when I want to post a comment the error is displayed SQLSTATE[HY000]: General error: 1364 Field ‘parent_id’ doesn’t have a default value (SQL: insert into comments (comment, user_id, commentable_id, commentable_type, updated_at, created_at) class CommentController.php public function store(Request $request) { $comment = new Comment; $comment->comment = ..

Read more