Questions tagged [laravel-facade]

Facades in Laravel framework provide a "static" interface to classes that are available in the application's IoC container.

Facades provide a "static" interface to classes that are available in the application's IoC container. Laravel ships with many facades, and you have probably been using them without even knowing it! Laravel "facades" serve as "static proxies" to underlying classes in the IoC container, providing the benefit of a terse, expressive syntax while maintaining more testability and flexibility than traditional static methods.

168 questions
0
votes
2 answers

Can't generate absolute path using URL::to() in laravel 5.2

I'm using Laravel 5.2 and I wanted to give my stylesheet an absolute path the stylesheet can't be loaded . when i use href="{{ asset('css/styles.css') }}" it works just fine but …
R0b0t0
  • 390
  • 6
  • 20
0
votes
0 answers

Laravel - at what point in app are Facades bound for eloquent notation?

This is a two-part question but I believe they are closely related. I am learning calling classes with Laravel, and trying to clarify when a "bound" (if I am saying this correctly) class may be called. This is Laravel 4.2.) Well into the…
Oliver Williams
  • 5,966
  • 7
  • 36
  • 78
0
votes
1 answer

Implementation of Facade in front of Factory class Laravel 5.4

For some context - earlier today I was struggling to figure out how to implement a facade similar to Cache - where I could set a provider (like disk()), but also have a generic fall back provider when not supplied. Now, I got the basic…
Trent
  • 2,909
  • 1
  • 31
  • 46
0
votes
2 answers

Laravel 5.3 - Auth Scaffolding How Are Errors Inserted

Im relatively new to Laravel and try to make sense of something. I created a basic project and used ` ` php artisan make:auth ` to generate a authentication scaffolding. In the generated views, the $errors variable is available. I know that this can…
0
votes
1 answer

Error on Creating Facade in Laravel 5.3

I try to create facade in laravel. My Facade : namespace App\Facades; use Illuminate\Support\Facades\Facade; class someclass_f extends Facade { protected static function getFacadeAccessor() { return new \App\Someclass(); } …
Shankar Thiyagaraajan
  • 1,705
  • 4
  • 28
  • 46
0
votes
1 answer

Is a repository or service provider required?

I am building a Laravel 5.3 app that pulls data from a number of potential sources. It's a fallback system with 3 sources: Database If not found, source 1 If not found, source 2 All 3 sources are quite simple and will be accessed in the same way,…
Mike
  • 8,767
  • 8
  • 49
  • 103
0
votes
0 answers

Pass variable throug Mail::send layout in Laravel 5

So I don't understand how to pass variable to my layout. Actually i'm using Mail::send('emails.aLaCarteMail', $data, function($message) use ($user) { $message->from('wtv@wtv.com', 'Agence de Voyage'); …
Baldráni
  • 5,332
  • 7
  • 51
  • 79
0
votes
1 answer

How to create Facades in Laravel 5.0 without using composer?

Thanks to all in advance. I am trying to create Facades for my custom and common functions in laravel 5.0 also I don`t want to create controller for that so I am using Facades. I have tried almost every tutorial but it do not help me. Please help me…
Muhammad Asfund
  • 97
  • 2
  • 10
0
votes
1 answer

Laravel 5.2 - ReflectionException Class laravel-fullcalendar does not exist

I am using the Fullcalendar package for Laravel 5. I am experiencing this error: ReflectionException in Container.php line 734: Class laravel-fullcalendar does not exist I have the Service Provider and the Facade in app.php. This is my…
J03Bukowski
  • 102
  • 3
  • 19
0
votes
1 answer

Laravel 5.2 with Sentinel 2 - Maximum function nesting level of '100' reached, aborting

In my base template of app.blade.php I do a simple check to see if the user is logged in. It looks like this: @if (Sentinel::check())
  • Members
  • @else
  • Login
  • LoneWolfPR
    • 3,978
    • 12
    • 48
    • 84
    0
    votes
    1 answer

    Shorthand IF within Laravel HTML Form

    I have a form input set up using the HTML facade: {!! Form::text('name', NULL, ['class' => 'form-control ($errors->has("name") ? " has-error" : "")', 'placeholder' => 'Enter your name'] ) !!} As you can I have put the $error->has inside the class…
    Lovelock
    • 7,689
    • 19
    • 86
    • 186
    0
    votes
    2 answers

    Laravel Form validation does not return errors

    I am trying to validate a form in Laravel. It redirects me back to form if I don't enter the required value, but my $errors remain the same every time object(Illuminate\Support\ViewErrorBag)#198 (1) { ["bags":protected]=> array(0) { } } My…
    baig772
    • 3,404
    • 11
    • 48
    • 93
    0
    votes
    1 answer

    Laravel 5 - Error updating with Form Facade

    Im trying to update the user object using a form facade in laravel, after submiting i get the error: ErrorException in Grammar.php line 102: Argument 1 passed to Illuminate\Database\Grammar::columnize() must be of the type array, string given,…
    BrunoMartinsPro
    • 1,646
    • 1
    • 24
    • 48
    0
    votes
    1 answer

    How to create a custom data retrieval class in Laravel?

    I'm currently building a little application using Laravel and want to show the weather on the dashboard. To do that I use a Composer package that accesses the Forecast.io API. However, since that API has a rate limit on free calls per day I would…
    Heiko Rothe
    • 331
    • 3
    • 16
    0
    votes
    2 answers

    Method open does not exist, Laravel, Form facade

    I am learning laravel following a tutorial. I am stuck with this error ErrorException in Macroable.php line 81: Method open does not exist. (View: path\to\project\resources\views\form.blade.php) I am using FormFacade. earlier I was facing an error…
    Prakhar Thakur
    • 1,209
    • 3
    • 13
    • 38