Category : laravel

Does +FollowSymLinks work with Windows shortcuts? It seems it is completely ignored by Apache under Windows 10. The importance of this is that, some web frameworks, like Laravel, use this directive to access storage folder (or any other folder outside the public directory) throughout symbolic links. Then, these features are simply ignored in Apache under ..

Read more

I understand there are very similar questions, but what I’m asking for is Tailwind Modal. The ones I’ve seen are for bootstrap and it does not work. I’m just looking for a generic/simple way to pass data without using plugins. Please help, thank you. @foreach($rentals as $rental) <a href="{{ route(‘rentals.destroy’, $rental->id) }}">–}} aria-label="Delete"> Delete </a> ..

Read more

I am trying to display my logs on my website to verified users in Laravel based on my role based access control. $file = fopen("/var/log/auth.log", "r") or die(); $content = fread($file, filesize("/var/log/auth.log")); fclose($file); This hits me with an error: fopen(/var/log/auth.log): failed to open stream: Permission denied I can see that Laravel does not have the ..

Read more

I have this working code with AS count self declared field using eloquent $delimeter = ‘ ‘; $keywords = explode($delimeter, $keyword_search); $base_query = DB::table(‘yeast_entire_search’)->selectRaw(‘ id, part_number, part_name, Round ((Char_length(Concat( LOWER(part_number), LOWER(part_name) )) – Char_length(REPLACE ( Concat( LOWER(part_number), LOWER(part_name) ), LOWER("’.$keyword_search.’"), ""))) / Char_length(LOWER("’.$keyword_search.’"))) AS count ‘); foreach($keywords as $keyword){ $base_query->where(function($query) use ($keyword){ $query->where(‘part_number’, ‘like’, ‘%’ ..

Read more

im facing an issue to retrive an array from my database and display it on my blade. So to understand my work, im actualy saving "Cart" informations on my "Orders Table" with Serialize the Products public function store(Request $request) { $order = new Order(); $order->user_id = request(‘user_id’); $order->wilaya = request(‘wilaya’); $order->province = request(‘province’); $order->address = ..

Read more

during the conception of my web site using laravel 7 I found some troubles when I wanted to customize my laravel customize my Laravel email verification message. first, I went to this file "C:xampphtdocsclinique_juridiquevendorlaravelframeworksrcIlluminateAuthNotificationsVerifyEmail.php",then i translate the sentences that are there . Here I met two issues, the first one some sentences are not in ..

Read more

This is the code I have inside my Action Class: public function fields() { return [ Date::make(‘checkin_date’), Date::make(‘checkout_date’), Textarea::make(‘remark’), Text::make(‘holder_name’), Text::make(‘holder_surname’), Text::make(‘clientReference’), ]; } What I’m looking for is to show the actual database value on each field. So a user would either choose to edit or keep values as they are. Sourc..

Read more

I have uploaded my Laravel project on ubuntu server via putty terminal. Composer installed on server machine but when i run any artisan command it gives an error. $ php artisan serve ErrorException require(/var/www/html/healthapi.fynity.in/routes/api/v1/api.php): failed to open stream: No such file or directory The api.php is already there but i don’t know why this error ..

Read more

I create new command in laravel: public function handle() { $serversList = [ ‘cubegame.pl’, ‘feerko.pl’, ‘skyup.pl’, ‘mcosada.pl’, ‘dragon-craft.pl’, ‘gc2.pl’, ‘mc.craftplay.pl’, ‘iskyblock.pl:25600’, ‘mc.craftmc.pl’, ‘mc.realcraft.pl’, ‘katomc.pl’, ‘mc.minestar.pl’, ]; foreach ($serversList as $server) { $req = Http::get("https://api.mcsrvstat.us/2/$server"); if ($req->ok()) { $status = $req->json(); // dump($status[‘motd’][‘html’][0]); $serv = Server::updateOrCreate( [ ‘name’ => $server, ‘ip’ => $status[‘ip’] ], [ ‘motd’ ..

Read more

I currently am using react hook powered component to record my screen, and subsequently upload it to Google Cloud Storage. However, when it finishes, the file created inside Google Cloud appears to be corrupt. This is the gist of the code within my React component, where useMediaRecorder is from here: https://github.com/wmik/use-media-recorder – let { error, ..

Read more

I create new own command in laravel, which updates some rows in mysql (in this case minecraft servers): public function handle() { $serversList = [ ‘cubegame.pl’, ‘dermc.pl’, ‘feerko.pl’, ‘skyup.pl’, ‘mcosada.pl’, ‘dragon-craft.pl’, ‘gc2.pl’ ]; foreach ($serversList as $server) { $req = Http::get("https://api.mcsrvstat.us/2/$server"); if($req->ok()) { $status = $req->json(); echo( $status[‘motd’][‘html’][0] ); // $serv = Server::updateOrCreate( // [ ..

Read more

I’m building an API to support an external application. I have added several routes to it with no problem, but suddenly, when I add a new route (acars/delay), I get a 404 error when trying to hit http://myurl.dev/api/acars/delay with a POST request. Here is my api.php file: Route::post(‘acars/deactivate’, ‘[email protected]’); Route::post(‘acars/ofp’, ‘[email protected]’); Route::post(‘acars/create’, ‘[email protected]’); Route::post(‘acars/pirep’, ‘[email protected]’); ..

Read more

Hi guys I am using Auth method in Laravel to try to print ‘logged in successfully’ if the user has provided correct credentials and to print ‘sorry you have entered wrong credentials’ if the user has not entered the correct credentials. But the problem is that am always getting the false statement I.e. ‘sorry you ..

Read more

For instance let’s say the ”’ $model_name = ‘student_table’; ”’ ‘providers’ => [ ‘users’ => [ ‘$model_name’ => [ ‘driver’ => ‘eloquent’, ‘model’ => AppModels.$model_name.::class ] ] ] The problem is that laravel fires an unexpected ‘.’ expecting identified (T_STRING) And I need to insert the model name dynamically because there lot of database tables ..

Read more

I am trying to get the exact uploaded image size by using getimagesize() php helper on Laravel 7. But i get an error ErrorException: Undefined property: IlluminateHttpUploadedFile::$name on the line where the code is: if($request->file(‘image’) != null){ $upload = $request->file(‘image’); $sourceProperties = getimagesize($upload->name); Please help understand the issues since it only occurs on the Debian ..

Read more