Data dodania Pytanie
2017-12-09 20:12 Laravel get last inserted data »
Please find the code below, Here I am trying to create master record and based on the id I am adding related data. $country = new Country; $...
(4) odpowiedzi
2017-12-09 20:12 Laravel app deploy on linux server using nginx got 404 error »
This is my last step for my class final project. I follow the steps from the Digital-Ocean {{ https://www.digitalocean.com/community/tutorials/how-to-...
(1) odpowiedzi
2017-12-09 20:12 Cannot declare class 'TestCommandRun', because the name is already in use »
I am using laravel 5.4. I am using php artisan list, but get the following error: C:\Users\admin\Desktop\Coding Projects\demo_laravel>php artisan...
(1) odpowiedzi
2017-12-09 15:12 SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'payments' already exists (SQL: create table `payments` »
When I migrate a table I see this error, SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'payments' already exists (SQL: create t...
(2) odpowiedzi
2017-12-09 14:12 How to set global variables from database in Laravel 5.4 »
I'm facing the same problem very often in various projects - I need to set some global variables from database and be able to receive them in anywhere...
(4) odpowiedzi
2017-12-09 11:12 Error : Trying to get property of non-object »
I have table Authors and table Uploads and I am simply trying to get all uploads for a certain author by author_id in the Uploads table. For that pur...
(1) odpowiedzi
2017-12-09 10:12 Why where clause doesn't affect of the query? »
Here is my code: $tracking_codes_obj = new TrackingCode; $tracking_code = 140; if ( !is_null($tracking_code) ) $tracking_codes_obj->where('tr...
(2) odpowiedzi
2017-12-08 20:12 Overwriting soft delete table column for a model »
I'm using laravel 5.4. I have a model that points to a database table that has the following attributes. id integer name varchar location ...
(1) odpowiedzi
2017-12-08 13:12 Condition in controller laravel »
I have this code in my Laravel controller public function index($id=false) { //get resto by name $resto_nom = DB::table('restos as r') ...
(1) odpowiedzi
2017-12-08 11:12 Laravel 5.5 BelongsToMany returns empty »
I'm trying to use a belongsToMany relation, i never had any problems with it but for some reason it returns empty. I've set up my relation in the Sto...
(1) odpowiedzi
2017-12-08 06:12 Verify stripe payment amount »
For my shopping site I have a fairy simple stripe implementation on the frontend where user hits "pay through stripe" button fills in CC details in a ...
(0) odpowiedzi
2017-12-07 22:12 How (and where) to register a custom query method in Laravel »
In my application I needed to retrieve the users who were registered in last 7 days. Later I realized I also need to check for 30 days and 365 days an...
(2) odpowiedzi
2017-12-07 22:12 How to add inside Laravel (Blade engine?) »
ROUTE: Route::get('usuario/{id}/edit', ['as' => 'users.edit', 'uses' => 'Admin\UserController@edit']); if it brings me the right id (data.id)...
(1) odpowiedzi
2017-12-07 15:12 Laravel Sold Items Count »
I want count the Sold items for every Seller. I try to change this Code: <?php $count = DB::table('purchases')->whereIn('seller_id', [4])->c...
(2) odpowiedzi
2017-12-07 13:12 Laravel 5.5 global variable in template from service provider »
How can I get info about logged user in service provider? When I use this in my template {{ $test }} always return 0 but i'm 100% sure that im logged ...
(2) odpowiedzi
2017-12-07 00:12 PHP (Laravel) Dependency Injection Basics »
I have recently come across the SOLID design principles and have been looking to find ways to incorporate dependency injection into my work so that I ...
(1) odpowiedzi
2017-12-06 23:12 How to listen messageSent event in laravel 5.5 »
Hi I am a beginner for events and listeners in laravel. So please explain me how to achieve this : Aim : Send an email to user. And know whether...
(1) odpowiedzi
2017-12-06 22:12 Having another Where Filter on Laravel »
I am trying to do a search and would only like to return the users with status of 1,4. Although when I try to use this, it grabs them all and ignores ...
(3) odpowiedzi
2017-12-06 17:12 Laravel How to pass variable from select box to url? »
What I am trying to do is basicly passing selected item's slug from a select box to route {{ Form::open(['route' => 'list/{category->slug(here)...
(2) odpowiedzi
2017-12-06 13:12 Route to URL helper default parameters »
I am using the code found here https://laracasts.com/discuss/channels/laravel/how-to-prefixing-in-routes-for-localization to prefix my routes with a l...
(2) odpowiedzi
2017-12-06 10:12 laravel - inserting id from one table to another right after submitting a form »
Since I'm new in Laravel (started using this framework 2 weeks ago), I'm having a hard time inserting an id from one table to another right after subm...
(2) odpowiedzi
2017-12-06 09:12 Laravel auth::atempt get only hashed password »
I've created account's in CRM and hashed password in it. $account->password = bcrypt($password); then on my web site I've created some guard and...
(1) odpowiedzi
2017-12-05 23:12 How to edit the view of "The page has expired due to inactivity" in Laravel 5.5 »
In Laravel 5.5, When you are using CSRF protection (by default) and you send a post request after long inactivity you'll get this error page (Screensh...
(1) odpowiedzi
2017-12-05 20:12 Laravel eloquent chunk does not work »
I have tried the following in laravel-5.4 application to use chunk: $out = []; \App\User::chunk(5,function($users) use($out){ foreach($users as $u...
(2) odpowiedzi
2017-12-05 18:12 Laravel delete all belongsToMany relations in belongsToMany relation »
I have a Tournament model which contains a belongsToMany relationship with a Session model: class Tournament extends Model{ public function sess...
(2) odpowiedzi
2017-12-05 10:12 How do I upload image in vuejs? »
Please, below is my code in the script section of my vue component. I'm getting all the input fields right but the image and video uploads are showin...
(1) odpowiedzi
2017-12-05 07:12 Accessing Model Through Custom Class »
I'm trying to access a model through a class. I'm trying to get this done on a Laravel 5.5 installation. The folder structure is the default except fo...
(2) odpowiedzi
2017-12-05 01:12 Laravel: Whats the difference between these two route api approach »
This Route::middleware(['cors'])->group(function () { Route::post('/login', 'AuthController@APIstore'); Route::middleware(['auth:api'])-...
(1) odpowiedzi
2017-12-04 19:12 Laravel route/{variable?} not working when not entered »
So in my web.php I have route like this: Route::get('city/{city_id?}', function($city_id) { return view('search'); }); But when I try to enter ...
(2) odpowiedzi
2017-12-04 15:12 Carbon\Carbon not found inconsistently - Laravel 5.5 »
So currently I pull back a date and convert it to a readable format in carbon: </div> <div class=""> <label for="Name">Letter Sent...
(2) odpowiedzi
2017-12-04 15:12 Laravel Regular Expression in Relationships »
Using Laravel, I am trying to get relations of a model using regular expressions rather than matching local and foreign keys. Is this possible? For e...
(0) odpowiedzi
2017-12-04 14:12 Laravel 5.5 render a React component in a blade view with data from the controller »
My goals is to be able to do something like this in my blade view. <Example name="{{ $user->name }}" /> But this doesn't render anything. ...
(1) odpowiedzi
2017-12-04 09:12 how to prevent undefined property when only one record found in Laravel »
I was try to make a search function so i'm doing like this: public function search(Request $request) { $query = $request->query('q'); $po...
(3) odpowiedzi
2017-12-03 22:12 Laravel 5.5 Resource Controller and Dependecy Injection »
I am working on a Laravel 5.5 application. When I use php artisan make:model SomeModel -mr it creates the model, migration and resource controller. I...
(3) odpowiedzi
2017-12-03 21:12 Laravel: Relation between three model »
I'm doing a project where every user can be assigned in a designation. I did my work by using three model: User, Designation & UsersDesignation ...
(2) odpowiedzi