Skip to main content

Posts

Laravel Template blade concept

 All Laravel view files need to store at resources folder.  Blade Document: https://laravel.com/docs/9.x/blade Blade template always have blade extension For ex: Home.php as Home.blade.php {{}} ==> it will print variable data simply act like PHP echo statements. @directive it is used for template or nested template, loops and conditions statements By default, Blade  {{ }}  statements are automatically sent through PHP's  htmlspecialchars  function to prevent XSS attacks. If you do not want your data to be escaped, you may use the following syntax: {!! $title !!} As refer above image, you can simply create a layout.blade.php for common page. Let take sample example html template In Layout Yield second parameter will be a default value if you doesn't set any title value. 

Creating google Oauth process step by step

  Step1: Create account in https://console.cloud.google.com/ Step2: Create a new project for your project Step3: Goto API & Services and then click on Credentials, You can check below image Step4: Click to create Credentials and create Oauth client ID After all done  And once follow same process  select web application finally you can see it Client-ID and Client-secret

What to do after .gitignore file updated?

After creating a  .gitignore  file in your repository and setting patterns to match files which you do not want Git to track, Git starts tracking repository files and respecting the patterns set in the  .gitignore  file after you run the  git add  command (For example  git add . ). The problem is that if we later make some changes to the  .gitignore  file and then just run the  git add  command again, the changes made in the  .gitignore  file  will not take effect . For example if you later set in the  .gitignore  file that you want Git to start tracking a file which you previously set to be ignored, the file will still be untracked if you just run the  git add .  command. This is because, the  git cache  needs to be cleared. I usually just do this with the  git rm -r --cached .  then after I run the  git add .  command to apply the  .gitignore  changes. Things to note to do when making changes to .gitignore file Here are just some points to note when making changes to the  .gitgnore  

Advanced Objects Introduction in JS

  Advanced Objects Introduction Remember, objects in JavaScript are containers that store data and functionality. In this lesson, we will build upon the fundamentals of creating objects and explore some advanced concepts. So if there are no objections, let’s learn more about objects! In this lesson we will cover these topics: how to use the this keyword. conveying privacy in JavaScript methods. defining getters and setters in objects. creating factory functions. using destructuring techniques. The this Keyword Objects are collections of related data and functionality. We store that functionality in methods on our objects: const goat = {    dietType : 'herbivore' ,    makeSound () {      console . log ( 'baaa' );   } }; In our  goat  object we have a  .makeSound()  method. We can invoke the  .makeSound()  method on  goat . goat . makeSound (); // Prints baaa Nice, we have a  goat  object that can print  baaa  to the console. Everything seems to be working fine. What if