by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    vikram parihar
    @vikramparihar
    Do you have any update regarding this
    Zachary Smith
    @zachisit
    Assuming that if I do not set up a Cors middleware like this - https://www.codementor.io/@chiemelachinedum/steps-to-enable-cors-on-a-lumen-api-backend-e5a0s1ecx - , then all requests coming into my Lumen app will not have Cors/cross domain related issues?
    UncertaintyP
    @UncertaintyP
    Do you expect Cross Origin Resource Sharing request? If so you have to set it up accordingly
    Zachary Smith
    @zachisit
    I expect to deploy an api written in Lumen and have the devs not have to deal with Cors stuff during testing.
    kcaribou
    @kcaribou
    Hi
    I have build laravel website successfully in local
    and I uploaded source code cpanel
    and tried to generate new app key
    but after upload source code to cpanel, it is not working when login.
    image.png
    please help me

    (1/1) DecryptException
    The MAC is invalid.

    in Encrypter.php (line 195)

    BELHARRADI JAMAL
    @jamalroger
    run this in cpanel inside your project php artisan key:generate
    kcaribou
    @kcaribou
    Hi @jamalroger
    thanks for your reply
    I already tried that in cpanel
    But that happens same issue
    Markychoco
    @Markychoco
    Hi guys. If I may ask is it advisable to use a decent name when creating a cpanel account or?
    @everyone
    Bakibillah Sakib
    @sakibian
    @Markychoco use anything simple. remember simple is always best.
    Markychoco
    @Markychoco
    @Bakibillah Sakib Thanks.
    BnodpriA
    @BnodpriA
    hello everyone
    i wanted to create popup on form load in index page only how can i do it, i am new in laravel
    Phx
    @phoenixg
    Does any one knows, if I upgrade illuminate/database dependency from 5.2.45 to the latest 8.x, what should I do? Is there an upgrade guide there?
    Bakibillah Sakib
    @sakibian
    Markychoco
    @Markychoco
    ezekel
    @ezekel
    Hi can I ask some help please I'm creating resource but I always get undefined $id can you please tell me what is wrong on my code please
    This message was deleted
    public function getApproval(){
    
           $approval = Expense::where('status_id',3)
                ->where('approve',0)->get();
    
    
           return new ExpenseResource( $approval );
        }
    namespace App\Http\Resources;
    
    use Illuminate\Http\Resources\Json\JsonResource;
    
    class ExpenseResource extends JsonResource
    {
        /**
         * Transform the resource into an array.
         *
         * @param  \Illuminate\Http\Request  $request
         * @return array
         */
        public function toArray($request)
        {
            return [
                'id'=> $this->id
            ];
        }
    }
    {
        "message": "Property [id] does not exist on this collection instance.",
        "exception": "Exception",
        "file": "/var/www/utang/vendor/laravel/framework/src/Illuminate/Support/Traits/EnumeratesValues.php",
        "line": 860,
        "trace": [
            {
                "file": "/var/www/utang/vendor/laravel/framework/src/Illuminate/Http/Resources/DelegatesToResource.php",
                "line": 136,
                "function": "__get",
                "class": "Illuminate\\Support\\Collection",
                "type": "->"
            },
            {
                "file": "/var/www/utang/app/Http/Resources/ExpenseResource.php",
                "line": 18,
                "function": "__get",
                "class": "Illuminate\\Http\\Resources\\Json\\JsonResource",
                "type": "->"
            },
            {
                "file": "/var/www/utang/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/JsonResource.php",
                "line": 95,
                "function": "toArray",
                "class": "App\\Http\\Resources\\ExpenseResource",
                "type": "->"
            },
            {
                "file": "/var/www/utang/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/ResourceResponse.php",
                "line": 39,
                "function": "resolve",
                "class": "Illuminate\\Http\\Resources\\Json\\JsonResource",
                "type": "->"
            },
            {
                "file": "/var/www/utang/vendor/laravel/framework/src/Illuminate/Http/Resources/Json/JsonResource.php",
                "line": 221,
                "function": "toResponse",
                "class": "Illuminate\\Http\\Resources\\Json\\ResourceResponse",
                "type": "->"
            },
            {
                "file": "/var/www/utang/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
                "line": 744,
                "function": "toResponse",
                "class": "Illuminate\\Http\\Resources\\Json\\JsonResource",
                "type": "->"
            },
            {
                "file": "/var/www/utang/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
                "line": 731,
                "function": "toResponse",
                "class": "Illuminate\\Routing\\Router",
                "type": "::"
            },
            {
                "file": "/var/www/utang/vendor/laravel/framework/src/Illuminate/Routing/Router.php",
                "line": 685,
                "function": "prepareResponse",
                "class": "Illuminate\\Routing\\Router",
                "type": "->"
            },
            {
                "file": "/var/www/utang/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
                "line": 128,
                "function": "Illuminate\\Routing\\{closure}",
                "class": "Illuminate\\Routing\\Router",
                "type": "->"
            },
            {
                "file": "/var/www/utang/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php",
                "line": 41,
                "function": "Illuminate\\Pipeline\\{closure}",
                "class": "Illuminate\\Pipeline\\Pipeline",
                "type": "->"
            },
            {
                "file": "/var/www/utang/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
                "line": 167,
                "function": "handle",
                "class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
                "type": "->"
            },
            {
                "file": "/var/www/utang/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php",
                "line": 59,
                "function": "Illuminate\\Pipeline\\{closure}",
                "class": "Illuminate\\Pipeline\\Pipeline",
                "type": "->"
            },
            {
                "file": "/var/www/utang/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php",
                "line": 167,
                "function": "handle",
                "class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
                "type": "->"
            },
            {
                "file": "/var/www/utang/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php",
                "line": 44,
                "function": "Illuminate\\Pipelin
    Uladzislau Danilchyk
    @danilchican

    Hi everyone!
    Could you help me guys? I have a guzzle request from my website to another one. Locally everything works fine. But on a server it worked as well, but after a couple of hours it's finished to work successfully and I found errors in log file about: 415 Media type is not supported.

    I tried to fix this error by assigning headers as null in Guzzle get() method call and it helped to start working as usual. But after an hour such calls by Guzzle finished with the same error.

    Could you help me please? Locally it works fine right now.

    8 replies
    HenkPoley
    @HenkPoley
    Were there recently (past months) some changes to cookies/sessions? I swear my upgrade of Laravel 5.4->5.5->5.6->5.7->5.8->6.x worked a few months ago. But currently I have login problems, or sessions not being available in my API. Afaik 5.6 still works 🤷‍♂️.
    HenkPoley
    @HenkPoley
    Works: 5.4, 5.6, 5.7
    Doesn't: 5.5, 5.8, 6.x
    🤷‍♂️
    Zachary Smith
    @zachisit
    I have a Command that works fine in my console. Note I'm using Lumen and not Laravel.
    But when I attach the command php artisan vapor:build-routes to a build stanza in a yml file, I get this message:
    The command "php artisan vapor:build-routes" failed.                         
    
      Exit Code: 1(General error)                                                  
    
      Working directory: /Users/zach/sites/Client_Lumen_Docker/.vapor/build/app   
    
      Output:                                                                      
      ================                                                             
    
       Command "vapor:build-routes" is not defined.                                
    
       Do you want to run "vapor:handle" instead?  (yes/no) [no]:
    This aforementioned yml file is called in a continuous integration script. Actually, it's called in the vapor.yml file when I push this package to Vapor - if anyone has any experience around Vapor this may be related?
    Tricia Cuninghame
    @tricky_codes_gitlab
    Can anyone shed light on why I can save/rename files to my storage file on GoogleDrive - but can't delete them?
    Is there a set of permissions somewhere I am missing?
    Storage::disk('artwork')->put('test.txt', 'Hello World');
    Works fine
    but
    Storage::disk('artwork')->delete('test.txt');
    doesn't
    nediazc
    @nediazc
    Hello
    Christoph, René Pardon
    @renepardon
    hey :)
    what’s the preferred way to get a job id from a redis queue and track it’s current status? do you have a suggestion on this? I’ve a queued event listener which implements ShouldQueue but inside the „handle“ method the call to $this->job->getJobId() returns just nothing
    BELHARRADI JAMAL
    @jamalroger
    did you run php artisan queue:work
    James Lewis
    @dynamiccarrots

    Hi all

    Having some issues with Laravel Guards

    I have just created a custom guard for my admin panel

    The issue is when using Auth::check() and logged in with my new admin guard Auth::check() returns true.

    As my default guard is 'web' and I'm logged out on that guard, shoudlent Auth::check() return false?

    Zachary Smith
    @zachisit
    If anyone has any insight into my previous question that would be helpful. Also can be seen here - https://stackoverflow.com/questions/63904800/laravel-lumen-artisan-command-works-locally-but-not-when-deploying-with-laravel
    UncertaintyP
    @UncertaintyP
    @dynamiccarrots Auth::check() will use the guard that successfully authenticated the user (the middleware sets it)
    James Lewis
    @dynamiccarrots
    @UncertaintyP should it not use the default guard which in this case is web
    abyong123
    @abyong123
    hi?