Quantcast
Channel: User Alexandr Blyakher - Stack Overflow
Browsing all 35 articles
Browse latest View live

Comment by Alexandr Blyakher on There is nothing happening when store data...

I think you should test function ChartAge::create() by passing just plain PHP array with only values that this function expected. $data = [ 'entity' => 'test value', 'code' => 'test', 'year'...

View Article



Comment by Alexandr Blyakher on How can I run in background command, which...

Yes it is a good idea to use Supervisord and the are some information about it in the Laravel docs laravel.com/docs/8.x/queues#supervisor-configuration

View Article

Comment by Alexandr Blyakher on WP_Query variables not resetting with the loop

I don't know, I assume you should have some loop in your code where you collect some IDs into this array loop starts if ($rel_post == $current_user_product) { $matching_id[] = $custom_post->ID; }...

View Article

Comment by Alexandr Blyakher on How to create data into junction table many...

$tag1 = Tag::firstOrCreate( ['name' => 'tag1'], ); $tag2 = Tag::firstOrCreate( ['name' => 'tag2'], ); $post = Post::create([ 'name' => 'tag name1', ]); $insertData = [ ['tag_id' =>...

View Article

Comment by Alexandr Blyakher on laravel jenssegers mongodb whereraw regex...

I believe that whereRaw method expects a SQL string as a parameter, not an array.

View Article


Comment by Alexandr Blyakher on errno: 150 "Foreign key constraint is...

Do you already have table 'articles' before you try to add foreign key constraint ?

View Article

Comment by Alexandr Blyakher on how can I fire broadcast event when a user...

If you want to check if the user is online or not it is better to use a websocket. If you want to broadcast messages to all user who is not online the artisan command with cron would be good if you...

View Article

Comment by Alexandr Blyakher on Laravel8 webpack vue extractstyle output...

Yes it may be cached and I have experienced this issue. Try to add any param in app.blade.php file where real compiled css style is included <link href="{{ asset('css/app.css?v=2') }}"...

View Article


Comment by Alexandr Blyakher on Laravel Task Scheduling not running all commands

Maybe you can to Logging from crontab to find out what command wasn't run properly. Please try something like this in crontab -e * * * * * cd ~/projects/statistics && php...

View Article


Comment by Alexandr Blyakher on maildev not catching sendmail

Hello, if you use the mail function in PHP and then your mail send to sendmail system function and finally you receive this mail in your real mailbox it means that maybe have been installed and...

View Article

Comment by Alexandr Blyakher on How to add own middleware on third-party...

Route::middleware('my_middleware')->group(function () { //a function that includes routes }

View Article

Comment by Alexandr Blyakher on PHP end() function not getting end Array item...

Do you tried to use Laravel collection methods? For example collect($data)->last();

View Article

Comment by Alexandr Blyakher on Laravel eloquent finding entry pairs with two...

yes maybe I just have a mistake in the definition of a relationship return $this->belongsToMany(Firmware::class, 'records'); $tests = Test::select(['tests.id as id', 'records.id as record_id',...

View Article


Answer by Alexandr Blyakher for PHP parse function call with parameters from...

I think you should use one good library to parse PHP code.that is some example of that kind of libraryuse PhpParser\Error;use PhpParser\NodeDumper;use PhpParser\ParserFactory;$code =...

View Article

Answer by Alexandr Blyakher for Get WordPress posts by tag Id in RSS

You can add a hook to your functions.php in WordPress theme file with some custom function to add a custom feed that gets posts by tag.Here is an example of such a hook function.add_action('init',...

View Article


Answer by Alexandr Blyakher for SQL Query for getting woocommerce products...

I just have tested your query and it works fine for me and select column model perfectly. You should check wp_term_taxonomy.taxonomy = 'pa_model'. Do you certain that 'pa_model' exactly exists in...

View Article

Answer by Alexandr Blyakher for How to match the variable of JQuery to PHP...

I think you should use jquery plugins like 'jquery select2'(https://select2.org/) or create some custom ajax request to send data from js to PHP backend and then get and handle a response from js part.

View Article


Answer by Alexandr Blyakher for FPDI - fopen( PDF.pdf ): failed to open...

Did you check the permission of the folder that is supposed to save the pdf file? Your webserver runs as some user and this user should have write permissions.

View Article

Answer by Alexandr Blyakher for Wordpress pagination not returning the same...

Maybe that is because of this piece of code $hide = get_field('hide_this_blog_post_from_the_main_blog_page', $post->ID); if($hide) continue;Do you try to comment this?

View Article

Answer by Alexandr Blyakher for Pass php value to html

You would try to format it this way:<?php $val = 5; $html = "<img src='${val}.svg' alt='15'> "; ?>

View Article
Browsing all 35 articles
Browse latest View live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>