laravel

Laravel + Wincache on MS Azure: Not storing values

*爱你&永不变心* 提交于 2021-02-19 05:32:38
问题 I am running a PHP application on azure and am experiencing some strange behaviour: This snippet runns in a Console command: public function fire(Illuminate\Contracts\Cache\Repository $cache) { $cache->forever('someKey', 'someValue'); var_dump($cache->get('someKey')); } The output is: NULL Accessing the value through wincache_ucache_get after executing the command also returns NULL (with prefix and without). Has anyone a clue on this? P.S.: As per phpinfo() the wincache usercache is enabled:

Laravel Nova: Group form fields in columns

非 Y 不嫁゛ 提交于 2021-02-19 05:30:51
问题 How can i create columns on my form fields in Laravel Nova? For instance, i'm trying to separate the first- and lastname but don't wanna have it on two lines. I would prefere to have it next to each other, but i don't find any possibility to choose that option. Does anyone have an idea how to solve it? Or has a package that does it? I already searched but nothing found. Thanks 回答1: This is currently not possible with Laravel Nova. 回答2: This can be acheaved with this package: https://github

Laravel authenticated dynamic subdomain routing

这一生的挚爱 提交于 2021-02-19 04:42:43
问题 I'm trying to get authenticated subdomain routing working for some specific variable subdomains: app.example.com staging.app.example.com testing.app.example.com These should be guarded by the auth middleware. They all essentially reference app.example.com but for different environments. Everything that hits these domains should go to the guest routes: example.com staging.example.com testing.example.com This is what I've tried so far... Created this middleware to prevent the subdomain

Is it unsafe to keep a Laravel project files inside public_html?

别说谁变了你拦得住时间么 提交于 2021-02-19 04:33:27
问题 I have 3 different laravel projects inside public_html (that is, one level below) on a shared hosting. I changed each domain/subdomain document root path to point to the respective project/public folder (i.e. public_html/project1/public) Additionally I put the Options -Indexes statement in my .htaccess files so people can't browse directly into my project files, and denied all access to .env files. Is there still a vulnerability doing this? 回答1: I assume that when you mention public_html,

Laravel worker not attempting the job but rather deleting it

江枫思渺然 提交于 2021-02-19 04:31:26
问题 laravel 5.4 php 7.1.32 supervisor 3.3.1 (I know... I know. The company is running 3 years behind) config/queue.php 'database' => [ 'driver' => 'database', 'connection' => 'queue', // means in config/database.php I have to setup a new connection 'table' => 'jobs', 'queue' => 'default', 'retry_after' => 90, ], supervisor configurations [program:laravel-worker] process_name=%(program_name)s_%(process_num)02d command=php /var/www/html/project/artisan queue:work autostart=true autorestart=true

Laravel worker not attempting the job but rather deleting it

岁酱吖の 提交于 2021-02-19 04:31:10
问题 laravel 5.4 php 7.1.32 supervisor 3.3.1 (I know... I know. The company is running 3 years behind) config/queue.php 'database' => [ 'driver' => 'database', 'connection' => 'queue', // means in config/database.php I have to setup a new connection 'table' => 'jobs', 'queue' => 'default', 'retry_after' => 90, ], supervisor configurations [program:laravel-worker] process_name=%(program_name)s_%(process_num)02d command=php /var/www/html/project/artisan queue:work autostart=true autorestart=true

Laravel queue push listener - queue monitoring

五迷三道 提交于 2021-02-19 04:18:10
问题 I am using the JobProcessing , JobProcessed and JobFailed to populate a queue logs table. I would like to also listen for an event as jobs are pushed to the queue. Does this exist? I see from running: \Redis::lrange('queues:mws', 0, -1) That a pushedAt parameter exists, but I am unsure how to get this in an event prior to the job actually being processed. This is fundamentally in order to check that my queues are all: a) actually running (the workers have not stopped). b) the job processing

Laravel queue push listener - queue monitoring

点点圈 提交于 2021-02-19 04:17:59
问题 I am using the JobProcessing , JobProcessed and JobFailed to populate a queue logs table. I would like to also listen for an event as jobs are pushed to the queue. Does this exist? I see from running: \Redis::lrange('queues:mws', 0, -1) That a pushedAt parameter exists, but I am unsure how to get this in an event prior to the job actually being processed. This is fundamentally in order to check that my queues are all: a) actually running (the workers have not stopped). b) the job processing

Laravel 4:: Returning models and its relationship

拜拜、爱过 提交于 2021-02-19 04:17:54
问题 I would like to return the model and part of its relationship EX:: User model public function comments() { return $this->hasMany('comments'); } Comments model public function user() { return $this->belongsTo('user'); } Can I return all comments and the user's name associated with the comment? The desired effect is $comment = Comments::find($id); $comment->user; return $comment; This will return the one comment and the associated user full model. I just need the name of the user. And this does

Laravel queue push listener - queue monitoring

[亡魂溺海] 提交于 2021-02-19 04:17:01
问题 I am using the JobProcessing , JobProcessed and JobFailed to populate a queue logs table. I would like to also listen for an event as jobs are pushed to the queue. Does this exist? I see from running: \Redis::lrange('queues:mws', 0, -1) That a pushedAt parameter exists, but I am unsure how to get this in an event prior to the job actually being processed. This is fundamentally in order to check that my queues are all: a) actually running (the workers have not stopped). b) the job processing