I can delete comments when i type this in the url.. /delete/{id} from the comment. I need that to be private/disabled. Route: Route::get('/delete/{id}', 'commentController@delete'); controller: function delete($id) { comment::where('id',$id)->delete(
I have a table like this: Table: item isBeautiful: Boolean isGreat: Boolean isAvaliable: Boolean I want to make a query with Eloquent that gives me all the items that are avaliable and are either isBeautiful or isGreat, or both. $avaliableitems = ite
i have a problem to get value from dropdown using laravel please tell me i am new to the laravel. Blade code: <form method="POST" action="{{url('/add_sub_cat')}}" enctype="multipart/form-data"> <input type="hidd
I have implemented a like/favourite function in my application, where a user can favourite a Charity - this is then stored in a table in my database - which is working reasonably well. How would I go about outputting the users favourites list to them
I am trying to do a "WHERE AND WHERE OR WHERE" query with laravel, basically what I want to do is get all the events where the user_id equals a certain something AND where type = 'something1' OR 'something2' but right now the event is now only s
I have laravel 5.0 . and set sessions drivers to database . I have some link that no require to insert new row in sessions table . how i can disable inserting new row only for www.site.com/download .Create a new route/middleware type for sessionless
dear all i am facing such problem on DO server, i have tried everything , the whole site is working 100% properly on linux server using Homestead but after uploading it , it works for one time , going down many times after reloading or refreshing the
I'm using Laravel to build and api based admin control application and I'm using Route:resource instead of regular GET and POST methods. Just realized my hosting provider DOESN'T ALLOW PUT and DELETE now I need to so now I have to use POST and GET me
I have this table, categories: id | name | slug Products: id | name | slug | category_id | brand_id Brands: id | name | slug | The problem occurs when I try to bring Brands here in the category of feature. Category Model public function brands() { re
I am writing the following code to logout particular user from Admin System. I have session table. I am following this link : https://laravel.com/docs/5.2/session $User = $this->Get($obj); $UserSession = SessionModel::where('user_id', $obj->UserID)-
I'm trying to get a user by username and return his profile page. The route is defined like this: Route::get('user/{slug}', 'UserController@getUserByName'); and in my UserController, I've defined getUserByName like this public function getUserByName(
I have a user resource with is linked in the users table. My Route: Route::resource('user', 'UserController'); UserController.php public function edit($id) { $user = User::find($id); return view('user.edit')->with(array('user'=>$user)); } public fun
so I started to use Laravel auth and in my Route in web middleware I wrote : Route::group(['middleware' => ['web']], function () { Route::auth(); }); and I got this error : Maximum function nesting level of '100' reached, aborting! and I tried to use
im new to laravel and i am currently doing a study project in laravel 5.2. Thr project is just a simple website having 3 pages (Home, About Us, Contact Us) fetching each page content from database and the home page having a slideshow. For that i down
I have public function checkCookie(Request $request) { // do something } in my controller and I am trying to call it from routes.php with Route::get('mypage',function(){ $a=new App\Http\Controllers\indexController; $a->checkCookie(); }); but I can't
Why am I having this error? I tried to add use Illuminate\Http\Request; but same error? Also is $username = $request->input('username'); the same as $username = Input::get('username');? The error I get is: FatalErrorException in LoginController.php l
My array ($response_array) is like this : Array ( [Auth] => Array ( [UserID] => test [UserIP] => 123 [XmlVersion] => Testing Version ) [SearchAvailRequest] => Array ( [CountryCd] => ID [CityCd] => JOG [CheckIn] => 2016-01-08 [Check
I am using http://www.maatwebsite.nl/laravel-excel/docs to export and import the database to excel file. Everything was running like a charm, but after several days, I found that something wrong with this library. It does not sudden happen, indeed, I
I need to extensively use statuses in mt project. I need them for my users (active, suspended, etc), an entity (active, pending_activation, inactive) and for my subscriptions(active, on_grace_period, not_subscribed, never_subscribed). So far I though
Is there any method like only for collections? $col=collection(['foo'=>'x','bar'=>'z',-]); $subcol=$col->only(['foo','bar']); // returns ['foo'=>'x','bar'=>'z'] I know that I can use the following function to achieve that, but I hope there
I have a user table that consists of these columns: | id | username | password | email | pants_size_id | shirt_size_id | pants_size_id and shirt_size_id are filled with foreign tables id keys where I store a list of sizes for pants and shirts in diff
I wanted to learn laravel framework. I could install laravel in my webserver(Wamp) and i get some tutorial to learn it but when i tryed to add style to 'h1' tag in the hello.php file place in this path:("C:\wamp\www\laravel-master\app\views\hello.php
<?php namespace vendor\laravel\framework\src\Illuminate\Support\Facades; use DB; use BaseController; class ModuleController extends BaseController{ public function index() { //Display data from students table. $data=DB::connection('mysql')->select('
Say for example I have a Dog resource and I want to query this resource using some RESTful API that I am creating. How would I produce and consequently handle a query with an "OR" condition. For example: http://url/dogs/?color=brown|black Would
How print value in this code: <li class="price-val">{{ $value->price ? '$value->price € month<span class="price-fea-ct">*VAT Included</span>':'$value->price € month' }}</li> $value->price variable is
I've set 2 environments for my app, a local development on my machine and the production environment on the server. I set them in bootstrap/start.phplike this: $env = $app->detectEnvironment(array( 'ariel_dev' => array('Ariels-MacBook-Pro.local'), '
I have simple controller which is fetching user from database and returning eloquent object to user. class UsersController extends \BaseController { public function show($id) { $user = User::find($id); return $user; } } By default Laravel returns JSO
I have a user with countries relationship. (hasMany) user_id 1 country_id 1 user_id 1 country_id 2 ... What I want is to get those users who have both countries (country 1 and country 2) How can I do this? I'm reading http://laravel.com/docs/eloquent
I have JSON response that looks like this: { "success": true, "ownersList": [ { "propertiesList": [], "email": "
[email protected]" }, { "propertiesList": [], "email": "
[email protected]
So I have this website, that some else build on Laravel. Since I need to make some changes I want to copy this website locally and make it work locally, so that later on I can apply the changes. I really don't want to work on the live site. So I copi