How to Secure an API method?

Hello, Today deciding somethings with my team, we had a doubt about how to protect an certain method of our system API. The problem is: We have an enti...

Database Config Prefix Bug

In my Laravel 5 config/database.php file I have the following driver defined. 'Portal' => [ 'driver' => 'sqlsrv', 'host'...

Instalation script

Hi, I need som advice or some example how to make instalation part for built application. I am planing to sell my work on codecanyon so I need to provide users with...

Checkbox showing "0" and "1" instead of "Yes" or "No"

Hello guys. First of all, thanks for the interest in my topic. I have a simple question i guess. There is a way to my checkboxes always display "Yes" or &q...
Tips
3
48

Why isn't this function to add days working?

Hi, So I have function that takes in the start date of an event and the number of days its running for, and it then (should) add those days to the start date to prod...

Helper Function

I'm curious to know if anyone has created a function that will return a set of action icons that I send to the function. For example edit, show, even maybe to ask for the d...

Selecting a route as a homepage

Hello, I need to select a page as a homepage. For example I have some pages /page1, /page2, /page3, etc. I need a mechanism that can select the routes as homepage (/...
Laravel
15
24

Using different $fillable values for create and update

Does anyone know if is possible to use $fillable with different values for create and update methods of an Eloquent model? I know there are these event models (creat...

Post Request not working.

Hi guys. I am trying to build an API with Laravel. However when I try to test POST request from POSTMAN, I notice it isn't work. I read the problem is "the global CSRF...
General
2
102

Using two databases in one query

Hello guys, I detected a little problem. I've got some data stored in MySQL database, but another data stored in ORACLE databse. Is there a way, how can I selecting from tw...

Laravel. Stored oracle functions result

Hello, I have stored oracle function that contains DML in it, so I can't just "select myFunc(x) from dual" So I have to do something like "begin y := myFunc(x); end" I'm...

Insert Oracle Select Mysql

Hi Guys, I am trying to insert data into an oracle table from a select of a mysql which isnt going to well :( DB::connection('ora...

CSRF best practices? Your personal experience with CSRF?

What are some best practices when it comes to applying the CSRF filter to routes on your Laravel app? In our production app (edit: we're on 4.2), we've initially app...
Tips
6
33

Table name convention

If I want to create an eloquent model for a table named "billing_accounts", how can I create it? Should I apply camel case like this? "BillingAccount"...

TokenMismatchException

Hi, i am using laravel 5 but in ajax call i have got one error like, TokenMismatchException in VerifyCsrfToken.php line 46: and also i have no exactly idea of...

Laravel And Datatables

I have a UsesController that currently looks like the following and I'm trying to figure out what is the best way for me to handle all my large amounts of data in my data....
General
13
98

Problem witch slug

Can some help me, i have page and articles i wont bot to been on website.com/{slug} this use for page public function show($slug) {...

hasOne with multiple keys

Hi, I have a issue i need to create a relation having 2 keys for example i have the next tabels --Products -id -name ... -supplier...

retrieve Pivot extra column value

In the model I am using following function to insert in a pivot table public function questions() { return $this->belongsToMany('ActivityQuest...

PHPStorm 8 Exclusion problem

I'm sorry if this is not the right place to do this, but I`m getting frustrated. I have a Laravel 4.1 project and I have a deployment server where the "Live&quo...
Create a New Discussion Button
Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels