CosminAndrei CosminAndrei
6

Detach if checkbox is unchecked

Hello guys. I have a pivot table with 2 foreign keys (product_type_id and file_id) for make relation with 2 tables(product_types and files table). For each file I c...
c4ost c4ost
1

Route does not redirect to method

Hello. I have a problem with route redirecting. I define route to the controller create method: Route::get('/posts/create', '[email protected]');...
Oldenborg Oldenborg
15

Separate controllers for API and WEB

With the new release of Laravel 5.3 Im building an application with both an API and a WEB interface. Should I make seperate controllers for API and WEB? Lets just us...
Laravel
15
3678
shami003 shami003
14

Records not deleting with foreign key constraints

I want to delete product when the auction is deleted. I have used the foreign key constraints but the product is not deleting. public function up() {...
Laravel
14
89
mustafaabdujalil mustafaabdujalil
4

Swagger with Laravel

How can i use Swagger with laravel ?!! any tutorial or article ? Thanks...
Laravel
4
3721
vidhyaprakash85 vidhyaprakash85
3

Fetching count in eloquent pivot table

I have users table and jobs table User Table id, Name, Email, Password etc Jobs Table id, Title, Description etc Pivot table applied_jobs...
baguzzzaji baguzzzaji
1

Protect a file from unauthenticated user on Digital Ocean Spaces

I have a laravel app that store some files on Digital Ocean Spaces. I make the file public, but is it possible to filter only authenticated user to download the files?...
shing_shing shing_shing
3

PHPSpreadsheet removes existing macros

I am writing on an existing template with macros. After saving it, the macros are all removed. Do you have any hacks in mind? #PHPSpreassheet...
General
3
173
LasseHaslev LasseHaslev
19

Vue.js and SEO

Hi, I have followed the screencast "The vast world of Vue.js". I love the simplicity of the framework and i would like to make use of the frame work of my sites....
Vue
19
2005
Naysoewin Naysoewin
3

Default User Avatar Toggle in Laravel

Hello, public function getAvatarPathAttribute($avatar) { return asset($avatar ? : 'https://www.gravatar.com/avatar/'); } If...
santino santino
4

how to get a record?

I use this code and get this return $info = $curso->sections->first(); { "id": 1, "course_id": 1, "sort_order":...
santino santino
9

HELP, convert string to json... ?

HI, please I am trying to get out the information of this string I save this string in a field of my data base [{"layout":"information&...
shami003 shami003
1

I am getting error in deleting records

Hi all, I want to delete a product in an auction. I am getting the following error: The DELETE method is not supported for this route. Supported methods: GET...
shami003 shami003
4

Can I disable error reporting in Laravel app while in Local environment?

Is it possible to disable error reporting in laravel app if the app is running locally like on xampp?...
keevitaja keevitaja
14

Get URI from route name

Hi, while there is a UrlGenerator which converts route name to URL, is there a way to easily get URI?...
General
14
4700
Sema314 Sema314
2

Add attribute to defined column in Migration file

Hi all, So I have a migration file already created as show below: <?php use Illuminate\Database\Migrations\Migration; use Ill...
chrisgrim chrisgrim
14

Image Intervention... "Can't write image data to path ({$path})"

Hi, I am trying to resize my images I upload using Image Intervention but I am having the hardest time getting intervention to save. Laravel has no issue creating a folder...
Laravel
14
6161
Romentigo Romentigo
2

Loading spinner in blade

I have layout "app.blade.php" and, for example, view "user.blade.php" with Vue components inside. I'v...
Laravel
2
333
Alex_B Alex_B
5

Eloquent get id based on where clause

I'm trying to get the id from a table based on a where clause condition. The sql query is pretty simple, but I keep getting errors no matter how I try this. I've tri...
shuvobhai shuvobhai
2

pivot table extra field update

i have a procurement_user pivot table and with that pivot table i have two extra field .one is product_id another one is bided(defualt = 0) .so i want when someone bid that...
Chron Chron
1

How do disable foreign key checks in tinker?

Is there a way to disable foreign key checks via tinker?...
JeroenvanRensen JeroenvanRensen
6

Custom redirect after login, based on user role

Hi everyone, I've got the following problem: When users sign in, I want to redirect them to a custom page, according to their role_id in the users...
General
6
120

How to query popular Posts/Category in laravel ?

How to Query popular categories using the eloquent model. I have a category model and showing popular categories on view. Do i need to created most_viewed or something like...
Zyberg Zyberg
1

How to assert that notifications was not sent?

I want to write a test that asserts that inactive users won't get a specific kind of a notification email. I know that to test the positive (as in: notification was sent) I...
Isavic Isavic
5

[07-Jul-2020 05:03:01 America/Chicago] PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home2/coinmac/interlink.coinmac.org/index.php on line 52

[07-Jul-2020 05:03:01 America/Chicago] PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$'...
theUnforgiven theUnforgiven
4

Date incrementing based on given date

Hi all, I hope everyone is well & healthy. I have a small issue, I can't seem to get my around. Just bashing this out in Tinkerwell for quickness,...
Jeremiah Jeremiah
1

Error

Trying to get property 'caseNo' of non-object...

Property [category] does not exist on this collection instance

I have a model Business and Category having a relationship of one to many like this One business belongs to a category Business.php public function ca...
gymdone gymdone
2

Vuetify with Spark

I would like to add vuetify to a new spark project. Is this a good? bad? idea? Could someone point me to tutorial to use the latest vuetify with the latest spark or...
Spark
2
132
vincent15000 vincent15000
2

Query result from two tables into one collection

Hello, I try to have the result of two queries in one collection. $creations = Drawing::where('published', 1)->orderBy('creation_date', 'desc')->...
umairparacha umairparacha
3

why i am getting %7D at the end of url by creating a link with named routes

why I am getting %7D at the end of the URL by creating a link with named routes....
ajsmith_codes ajsmith_codes
2

Data not passing to details view.

I've done this many times and it works, but I'm missing something here. I bet it's very simple, but I can't seem to pinpoint it. When on the index view, the user cli...
azdonald azdonald
3

Retroactively add Migrations to a project

Hi everyone, A project started without a framework was recently moved to Lumen. I want to add tests to the project using SQLlite as DB but since the project was sta...
General
3
154
Luis100079 Luis100079
3

Create model based on migration

Hi, thanks for reading How may I create a model based on a migration o table that already exists? for example letÅ› suposse have a existing migration and a ta...
IvanRadojevic IvanRadojevic
1

Passing multi data from Laravel to Vue?

How to pass two or more variables to Vue with v-binding? public function create() { $guests = Guest::all(); $hotels = Hotel::all();...
Create a New Discussion Button