luanrodriguesp

luanrodriguesp

Member Since 4 Years Ago

Mossoró

Experience Points 5,925
Experience Level 2

4,075 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 44
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

31 Mar
2 years ago
23 Jan
2 years ago

luanrodriguesp started a new conversation Unknown Variable 'performance_schema=ON' - Mysql

I'm using homestead but i'm getting this error when i try to create a new database.

unknown variable 'performance_schema=ON'

Any one has faced this problem?

Thanks in advance.

03 Jan
3 years ago

luanrodriguesp started a new conversation [L5.2] Search Form Not Working On Production Server

I have a search form(via get), locally it works well but when i deploy for production the form just stop to work.

here is my Controller:

<?php
namespace App\Http\Controllers;

use App\Question;
use Illuminate\Http\Request;
use App\Http\Requests\QuestionRequest;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Redirect;
use Laracasts\Flash\Flash;

class QuestionsController extends Controller
{
    protected $requests;

    public function __construct(Request $request)
    {
        $this->requests = $request;
    }


    public function index(){

        if($this->requests['search']) { //on production it comes null
            $q = $this->requests['search'];

            return view('questions.index', array(
                'questions'  => Question::search($q)->paginate(20),
                'searchMsg' => 'Resultado(s) para o termo \'<i>'.$q.'</i>\' ',
            ));
        }

        $questions = Question::orderBy('updated_at', 'DESC')->paginate(20);
        return view('questions.index', array(
            'questions' => $questions
        ));
    }
}
02 Jan
3 years ago

luanrodriguesp started a new conversation When I "touch" A Model, Laravel Updates The Update_at Field And Also Created_at.

The problem is: when I "touch" a model, Laravel updates the updated_at field and also created_at.

And to become most weird, my default timezone is 'America/Fortaleza', when touched updated_at get the right time, but created_at gets another time(different time zone).

So, updated_at is OK, but created_at is getting time in future.

Someone know what may be occurring??

01 Dec
3 years ago

luanrodriguesp left a reply on Any Way To Display Error Messages And Flash Messages In A Single Blade Line?

@Snapey this thread has no correct answer yet, why do you think that is better to start a new one? In my point of view you are completely wrong, if I drag an old one and if it get it correct answered, all the people involved in the thread will be notified.

27 Nov
3 years ago
05 Sep
3 years ago

luanrodriguesp left a reply on Not Found

Solved like this: gulpfile.js

var elixir = require('laravel-elixir');
var bowerDir = 'bower_components/';


elixir(function(mix) {
    mix.sass("app.scss")

        .copy(
            bowerDir + 'normalize-css/normalize.css',
            'public/css/vendor/normalize.css'
        )
        .copy(
            bowerDir + 'jquery/dist/jquery.min.js',
            'public/js/vendor/jquery.js'
        )
        .copy(
            bowerDir + 'semantic/dist/semantic.min.js',
            'public/js/vendor/semantic.js'
        )
        .copy(
            bowerDir + 'semantic/dist/semantic.min.css',
            'public/js/vendor/semantic.css'
        )
        .copy(
            bowerDir + 'font-awesome/css/font-awesome.min.css',
            'public/css/vendor/font-awesome.css'
        )

        .copy(
            bowerDir + 'font-awesome/fonts',
            'public/css/vendor/fonts'
        );
});

luanrodriguesp started a new conversation Not Found

Hello guys when I run 'gulp' i get these erros below.

19 Jun
4 years ago

luanrodriguesp left a reply on Disable Registration [L5]

@RachidLaasri I can't delete it because Im using the another methods. I also have my routes registred. I just don't want all the methods to be available.

luanrodriguesp left a reply on Disable Registration [L5]

@RachidLaasri my problem is, I just want to remove the 'auth/register' method, so, a guest will be not albe to self register.

luanrodriguesp left a reply on Disable Registration [L5]

doenst work like you are thiking

luanrodriguesp left a reply on Disable Registration [L5]

Is enabled by default

luanrodriguesp started a new conversation Disable Registration [L5]

Hey guys, how can i disable user registration in L5?

Im using the others methods, but the i dont want to use self-registration.

Thank you.

luanrodriguesp started a new conversation Get ID After Create

How do I get the ID after Create?

Example:


User::create($data);
//how do i get the ID for this action.

Thank you.

06 Jun
4 years ago

luanrodriguesp left a reply on Best Practices For Custom Helpers On Laravel 5

I did the same way that @JeffreyWay said and i'm getting "Call to undefined function"

here is my helpers.php


class Helpers {

public function FixData($data){
    $d = explode("-", $data);
    return $d[2]."/".$d[1]."/".$d[0];
}

}

01 May
4 years ago

luanrodriguesp left a reply on [L5] Pagination Model

@Sonu @tmartinco this will not work because it will get all data from table comentarios, i dont need this.

What I need is load just the data that correspond with the relation bellow

public function comentarios()
{
    return $this->hasMany('App\Comentario', 'id_modelo', 'id'); // i want to paginate this one...
}
30 Apr
4 years ago

luanrodriguesp started a new conversation [L5] Pagination Model

Hello guys, Im trying to paginate a eloquent relation and im getting a lot of problems.

This is my model...


use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Eloquent\SoftDeletes;

class Modelo extends Model {

use softDeletes;
public $errors;
protected $table = 'modelos';
protected $dates = ['deleted_at'];
protected $fillable = ['id_usuario', 'foto_perfil', 'nome', 'slug', 'idade', 'id_cidade', 'sexo', 'altura', 'peso', 'quadris', 'atendimento_tipo', 'atendimento_lugar', 'cache', 'telefone1', 'telefone2', 'telefone3', 'cartao', 'perfil', 'publicado', 'status'];



public function fotos()
{
    return $this->hasMany('App\Foto', 'id_modelo', 'id');
}

public function usuario()
{
    return $this->hasOne('App\User', 'id', 'id_usuario');
}

public function comentarios()
{
    return $this->hasMany('App\Comentario', 'id_modelo', 'id'); // i want to paginate this one...
}

public static function modeloBySlug($slug){
    return Modelo::where('slug', '=', $slug)
        ->where('publicado', '=', '1')
        ->where('status', '=', '2')
        ->get();
}

}

can you guys please help me to solve it?

thank you in advance

13 Apr
4 years ago

luanrodriguesp left a reply on [L5] How To Delete A File Using Filesystem

Method 'delete' not found in class \Illuminate\Support\Facades\Storage Referenced method is not found in subject class.

luanrodriguesp left a reply on [L5] How To Delete A File Using Filesystem

I already tryed with Storage, i got the same problem.

luanrodriguesp started a new conversation [L5] How To Delete A File Using Filesystem

Hello guys, i want to delete a file using filesystem method, my problem is when i use it, it says that method delete doesnt exist.

Example:


File::delete($pathToFile);

31 Mar
4 years ago

luanrodriguesp started a new conversation [L5] FREE ACCESS TO A PROTECTED METHOD

Hello guys,

Anyone knows to give free access(guest access) to a specific method of a protected controller(protected by Auth)??

Tks in advance.

29 Mar
4 years ago

luanrodriguesp left a reply on [L5] Get User ID After Register.

@neamtua yes, but where to do this? I'm using the auth system that already comes with laravel.

luanrodriguesp started a new conversation [L5] Get User ID After Register.

Hello guys,

I'm building an web app, and now I'm facing a problem that i dont know how to solve.

I have a users table and profiles table, each user must have a profile.

What i wanna do is immediately after user register, insert a new profile with his user.id.

Anyone know how to do this?

28 Mar
4 years ago

luanrodriguesp left a reply on [L5] Problems With Action And Params

The problem is not about the routes, its about params.

luanrodriguesp started a new conversation [L5] Problems With Action And Params

Hello guys,

Im facing a problem that I really dont know how to solve, hope you guys can help me out.

Im trying to pass 2 params to an ACTION like this bellow


action('ProdController@show', array('prod' => $item->id, 'foto' => $item->foto))

But Im always getting an error:

Missing argument 1 for App\Http\Controllers\ProdController@show

Its because the '/' is not going at URL the action is generating this

http://domain.dev/prod?prod=1&foto=8c45906f0cfb410a46579b9de4c72d84.JPG

Anyone knows to make the ACTION generate the '/' ???

27 Mar
4 years ago

luanrodriguesp left a reply on [L5] Multiple Laravel App In The Same Host

@hostianer if I use a new vhost I will have to change de port, its not so nice. =\

luanrodriguesp left a reply on [L5] Multiple Laravel App In The Same Host

@pmall It could be,

maibe like this, panel.domain.com, admin.domain.com and site goes at domain.com

But can be also like this

domain.com/panel, domain.com/admin and site goes at domain.com

luanrodriguesp started a new conversation [L5] Multiple Laravel App In The Same Host

Hello guys,

I'm building an website, and i want to use 3 installations for this,

1º installation - Will hold an website 2º installation - Will hold a clientPanel 3º installation - Will hold a adminPanel

I'm trying to configure nginx to work with it, but i didn't get it.

Any one has some sample?

Thank you in advance.

luanrodriguesp left a reply on How To Handle "No Query Results For Model"

@usman in L5 where shuould i put the code?

thank you.

26 Mar
4 years ago
25 Mar
4 years ago

luanrodriguesp started a new conversation [L5] Display An Image From Storage Folder With Intervention

Hello guys,

Im trying to display an image at browser using the code below


$path = storage_path().'/app/'.$id;
$img = \Image::make($path)->response('jpg');
return $img;

I'm always getting white page, it doesn't show the picture.

Thank you all in advance.

20 Mar
4 years ago

luanrodriguesp left a reply on [L5] Blade Form Open

@EliasSoares thank you very much brow!

luanrodriguesp left a reply on [L5] Blade Form Open

@EliasSoares this will work if i do not pass a varial???

luanrodriguesp started a new conversation [L5] Blade Form Open

Hey guys, I need some help from you all.

At L4 when I want to populate a form with my collection I use form open like this:

{!! Form::open($slide, array('route' => array('slide.update', $slide->id), 'method' => 'PUT', 'files' => true)) !!}

But in L5 this is not working, I'm always getting an ErrorException

Argument 1 passed to Collective\Html\FormBuilder::open() must be of the type array, object given, called in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\mc\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 213 and defined (View: C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\mc\resources\views\slides\edit.blade.php)

22 Feb
4 years ago

luanrodriguesp left a reply on [L5] Multiple Parameters In A Route

@willvincent man, really thank you! it just work well! thank you very much!

21 Feb
4 years ago

luanrodriguesp started a new conversation [L5] Multiple Parameters In A Route

Hello all,

Guys, I'm creating a system that will work similar to dropbox, I'm facing a problem with a route. my URL will be like this: www.mydomain.com/home/folder1/folder2/folder3/folder4

the problem is, the parameters at the URL will depend of the numbers of sub folders that each folder have.

You guys have any idea how to do this?

Thank you all!

luanrodriguesp left a reply on [L5] Nice Names Attributes - Validation

@shaun yes, at view the field name is email_address @bestmomo no, just en

luanrodriguesp left a reply on [L5] Nice Names Attributes - Validation

@bestmomo I just tryed my form using the solution above and still nor showing the custom msg, thank you.

luanrodriguesp left a reply on [L5] Nice Names Attributes - Validation

So I did this...


'custom' => [
        'email_address' => [
            'required' => 'Well you need to tell us your email address :)',
        ],
    ],

but where to change in Request to use my new custom msg?

CustomRequest.php


public function rules()
    {
        return [
            'email_address'      => 'required',
        ];
    }

luanrodriguesp started a new conversation Nice Names Attributes - Validation

Hello all!

Im working on validation form, I would like to display betters names when the user get any error, for example: Actual i have: "The user_email is required" , this is better: "The Email Address is required."

17 Feb
4 years ago

luanrodriguesp left a reply on Filesystem - List Directories

@blackbird give an example of condition YOU may use if you were in my shoes.

luanrodriguesp started a new conversation Filesystem - List Directories

Hello guys, i'm trying to list all folders from a directories, i done it, but not the way i want, when i say to list (Storage::directories('/mainfolder'), i get a list of sub-folders like...

mainfolder. <----- this i dont want to list mainfolder.. <----- this i dont want to list mainfolder\subfolder1 <--- this is ok mainfolder\subfolder2 <--- this is ok mainfolder\subfolder3 <--- this is ok

anyone know to do not list that folders above.