Giter Site home page Giter Site logo

dary_tutorial's Introduction

Code with Dary laravel tutorial

laravel new project_name //or alternative is via composer composer create-project --prefer-dist laravel/laravel project_name

starting project

php artisan serve php artisan serve --port=XXXX

removing IP from url

change /etc/hosts file

editors - VScode

extensions:

  • laravel artisan - it perform artisan command in the vs code terminal
  • laravel blade snippets winnie lin
  • laravel blade spacer - create spaces between brackets
  • laravel goto view - codingyou - it will open the view after hovering mouse
  • laravel snippets - winnie lin - autocomplete
  • laravel extra intellisense - amir
  • live sass compiler 54:22 - ritwick dey
  • beautify css - michelemelluso
  • php instellisense - felix becker
  • getter/setter generator / augustin martinez ibarra
  • bracket pair colorizes - coenraadS
  • emmet live - yuri semeniuk - html templates
  • github
  • javasscript - charalampos karypidis
  • vscode great icons - emmanuel beziat

FILE- preferences File Icons Thme / choose VS gret icons help - file icons

what is .env file

enviroment setups are here what is redis_host?

CREATOR_NAME = "Miro"

return env('DB_DATABASE');

.env.example - if you make changes, it is like template

composer json and lock file

composer is dependency manager

rm -rf composer.lock

composer install composer update

composer and packagist

adding library google -> mollie api php

packagist.org -> search for mollie copy: composer require mollie/mollie-api-php //it will pull all necessary libraries from packagist composer update

the vendor directory

here is autoload files, also our laravel project is in vendor directory there is source code for laravel framework!!!

basic routing

/routes/web.php there can be also another tye of requests than get

php artisan serve ->error vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in https://stackoverflow.com/questions/41209349/requirevendor-autoload-php-failed-to-open-stream composer install //which will import your packages and create the vendor folder, along with the autoload script.

http responses in routing

//Route that will send back an array, laravel will automatically convert an array to JSON response return json return function

//Route to users, returning string Route::get('users', function (){ return 'Welcome to the users page'; });

//Route that will send back an array, laravel will automatically convert an array to JSON response Route::get('/users', function(){ return ['PHP', 'HTML', 'Laravel']; });

//Route that will send back JSON object Route::get('/users', function(){ return response()->json([ 'name' => 'Miro', 'course' => 'Laravel Beginner' ]); });

//Route that will send back function Route::get('/users', function(){ return redirect('/'); });

creating our first page

creating home view

controllers

manual way for creating controller app/Http/Controllers create file ProductsController.php

Products in view we can then change easily URL # views https://github.com/codewithdary/portfolio_for_beginners_html5_css3 remove ProductsController remove view folder products change route in web.php to PagesController if we want add image to the page

2:30:53 creating symbolic links

dary_tutorial's People

Contributors

miroslavsavel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.