Category

Laravel Error

Category

<form class=”newsletter” id=”newsletter”> @csrf <input type=”email” placeholder=”Enter your email address” name=”email” required=””> <button type=”submit”>Subscribe</button> </form> <script> $(‘.newsletter’).on(‘submit’, function(e) { e.preventDefault(); $.ajax({ type: “POST”, url: ‘newsletter’, data: $(this).serialize(), success: function(msg) { document.getElementById(“newsletter”).reset(); swal(“thank you for subscribing newsletter!”); } }); }); </script>

<?php $str = ‘<p><span style=”color: #444444; font-family: arial; font-size: 16px; letter-spacing: 0.6px; background-color: #ffffff;”>Established in year</span><strong style=”color: #444444; font-family: arial; font-size: 16px; letter-spacing: 0.6px; background-color: #ffffff;”>&nbsp;2007,&nbsp;</strong><strong style=”color: #444444; font-family: arial; font-size: 16px; letter-spacing: 0.6px; background-color: #ffffff;”>Galaxy Computer&nbsp;</strong><span style=”color: #444444; font-family: arial; font-size: 16px; letter-spacing: 0.6px; background-color: #ffffff;”>is&nbsp;</span><strong style=”color: #444444; font-family: arial; font-size: 16px; letter-spacing: 0.6px; background-color: #ffffff;”>Wholesale Trader and Service Provider</strong><span style=”color: #444444; font-family: arial; font-size: 16px; letter-spacing: 0.6px; background-color: #ffffff;”>&nbsp;of&nbsp;</span><strong style=”color: #444444; font-family: arial;…

In folder config => database.php make sure mysql strict is false, like this ‘mysql’ => [ ‘driver’ => ‘mysql’, ‘url’ => env(‘DATABASE_URL’), ‘host’ => env(‘DB_HOST’, ‘127.0.0.1’), ‘port’ => env(‘DB_PORT’, ‘3306’), ‘database’ => env(‘DB_DATABASE’, ‘forge’), ‘username’ => env(‘DB_USERNAME’, ‘forge’), ‘password’ => env(‘DB_PASSWORD’, ”), ‘unix_socket’ => env(‘DB_SOCKET’, ”), ‘charset’ => ‘utf8mb4’, ‘collation’ => ‘utf8mb4_unicode_ci’, ‘prefix’ => ”, ‘prefix_indexes’ => true, ‘strict’ => false, ‘engine’ => null, ‘options’ => extension_loaded(‘pdo_mysql’) ? array_filter([ PDO::MYSQL_ATTR_SSL_CA => env(‘MYSQL_ATTR_SSL_CA’), ]) : [], ], if strict is true, make it…

Here is my configuration to make HTTPS working with assets. To enable this in production add REDIRECT_HTTPS=true in the .env file. REDIRECT_HTTPS=true <?php namespace App\Providers; use Illuminate\Support\ServiceProvider; use Illuminate\Support\Facades\Schema; class AppServiceProvider extends ServiceProvider { /** * Bootstrap any application services. * * @return void */ public function boot() { if(env(‘REDIRECT_HTTPS’)) { \URL::forceScheme(‘https’); } Schema::defaultStringLength(191); } /** * Register any application services. * * @return void */ public function register() { // } }

Add below code in config/database.php ‘mysql’ => [ ‘driver’ => ‘mysql’, ‘host’ => env(‘DB_HOST’, ‘localhost’), ‘port’ => env(‘DB_PORT’, ‘3306’), ‘database’ => env(‘DB_DATABASE’, ‘laravel_crud_vue’), ‘username’ => env(‘DB_USERNAME’, ‘root’), ‘password’ => env(‘DB_PASSWORD’, ‘root@123’), ‘charset’ => ‘utf8’, ‘collation’ => ‘utf8_unicode_ci’, ‘prefix’ => ”, ‘strict’ => true, ‘engine’ => null, ‘modes’ => [ ‘ONLY_FULL_GROUP_BY’, ‘STRICT_TRANS_TABLES’, ‘NO_ZERO_IN_DATE’, ‘NO_ZERO_DATE’, ‘ERROR_FOR_DIVISION_BY_ZERO’, ‘NO_ENGINE_SUBSTITUTION’, ], ],