Server requirement for laravel 5.6 installation
php-7.13 open ssl php extension PDO php extension MBstring php extension Tokenizer php extension XML php extension Ctype php extension JSON php extension Click here for more interview questions
php-7.13 open ssl php extension PDO php extension MBstring php extension Tokenizer php extension XML php extension Ctype php extension JSON php extension Click here for more interview questions
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
<!DOCTYPE html> <html> <head> <style> .std_div_name { color:red; font-size=40px; } .maindiv { width:450px; height:540px; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> </head> <body> <input type="text" id="stdname" name="stdname" onkeyup ="changeStudentname();"> <div class="maindiv"></div> <div id="std_div_name" class="std_div_name"></div> </body> </html> <script> $(document).ready(function(){ $(".maindiv").css("background-image", "url('http://localhost/test/image_school/idcard.jpg') no-repeat;"); }); function changeStudentname() { //$('#mainDiv').css("background-image", "url(/image_school/idcard.jpg)"); //$(".maindiv").css("background-image", "url(/image_school/idcard.jpg) no-repeat;"); //$('.maindiv').css('background-image', "url('/image_school/idcard.jpg')"); var stdname=$("#stdname").val(); $("#std_div_name").text(stdname); } </script> |
This issue comes because of missing csrf token please add the below code if its not there.
1 2 3 4 5 |
$.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') } }); |
1 |
<meta name="csrf-token" content="{{ csrf_token() }}" /> |
Below code explains the laravel redirection afterlogout. After logout if you try to access home/dashboard, it will redirect to following url http://localhost/schoolidcard/public/index if we try to access the below url http://localhost/schoolidcard/public/superadmin/dashboard it should redirect to http://localhost/schoolidcard/public/superadmin/ instead of this it is redirecting to below path http://localhost/schoolidcard/public/index Solution:for redirecting to superadmin/login .Add the below lines of… Read More »
I m getting the below error while executting the ajax call with FormData TypeError: ‘append’ called on an object that does not implement interface FormData. Present code Looks like as below
1 2 3 4 5 6 7 8 |
var formObj = $('#addTeacherForm'); var formData = new FormData(formObj[0]); $.ajax({ url: 'chkExistTeacherData', async: true, type: "POST", data: formData, dataType: "html", |
Solution:Please add the below lines of code in the ajax request processData: false
Following are the code for domain name validation.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
<!DOCTYPE html> <html> <body> <h1>Web Url Validation</h1> <input type='text' name='Website' id='Website'> <button id="mybutton" onclick="myFunction()">Validate</button> <p style="color:red" id="error"></p> <script> function myFunction() { var text = document.getElementById("Website").value; var pattern = /^(http[s]?:\/\/){0,1}(www\.){0,1}[a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,5}[\.]{0,1}/; if (!pattern.test(text)) { document.getElementById("error").innerHTML = "Invalid domain"; } else { document.getElementById("error").innerHTML = "Valid domain"; } } </script> </body> </html> |
Unhandled Promise rejection: Template parse errors: Can’t bind to ‘ngif’ since it isn’t a known property of ‘div I m getting the above error while execute my angular js code.
1 |
<div *ngif='appstatus'>{{apptitle}}</div> |
usulay this error will throw due invalid syntax.here small letter is used in the if(ngif).if you change to ngIf it will works fine.
In the Following angular js code i m getting the below error unhandled Promise rejection: Failed to load app.test.html ; Zone: ; Task: Promise.then ; Value: Failed to load app.test.html undefined my code looks like below
1 2 3 4 5 6 7 |
import { Component } from '@angular/core'; @Component({ selector: 'my-app', templateUrl: 'app.test.html' }) export class AppComponent { apptitle:string='Welcome to the world of angularjs Mr Vasanthan';appstatus:boolean=true; } |
Solution:This issue because of wrong syntax. use templateUrl: ‘app/test.html’ instead of templateUrl: ‘app.test.html’.
How to remove index.php in the url of laravel in ubuntu Solutiion:After a fresh installation of laravel 5.6 with php7 in ubuntu 16 version.if we execute the below url http://localhost/myproject/public — this will show the welcome page http://localhost/myproject/public/adminlogin — this will not work .But if you add index.php in the url like below http://localhost/myproject/public/index.php/adminlogin– this… Read More »