This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sugeneruojama nuoroda | |
// Failas: src/app/app-routing.module.ts | |
const routes: Routes = [ | |
{ path: '', component: ProductsListComponent}, | |
{ path: 'products/:id', component: ProductPageComponent}, // Kaip Perduoti informaciją į šį route :id parametras | |
]; | |
// Naudojame html template [routerLink] direktyva perduodant informacijos masyva. | |
// 1 parametras url pavadinimas, 2 parametras, produkto ID kintamasis |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// You should include jQuery for this to work | |
$(document).ready(function () { | |
$('.first-slider').slick({ | |
slidesToShow: 3, | |
slidesToScroll: 1, | |
autoplay: true, | |
autoplaySpeed: 2000, | |
dots: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Galime naudoti ir paprasta css sintakse | |
.slick-relative { | |
position: relative; | |
} | |
.slick-slide { | |
height: 150px; | |
} | |
.slider-wrapper { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="input-group mb-3"> | |
<form method="POST" action="{{route('show.student', $student->id)}}"> | |
<select name="student_id" class="custom-select"> | |
<option selected disabled>Pasirinkite vardą</option> | |
@foreach($students as $student) | |
<option value="{{ $student->id }}">{{$student->name . " " . "$student->surname"}}</option> | |
@endforeach | |
</select> | |
<input type="submit" value="Rodyti"> | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{-- Neverciamas stringas blade faile --}} | |
<h2>Rasyti komentara</h2> | |
{{-- Verciamas stringas blade faile --}} | |
<h2>{{ __("Rasyti komentara") }}</h2> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Laravel crud naujienu pridejimas | |
— pries tai padaryti reikia — | |
sukurti NewsControlleri, su php artisan komanda | |
php artisan make:controller newsController | |
sukurti News Modeli, su php artisan komanda | |
php artisan make:model NewsItem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App; | |
use Illuminate\Database\Eloquent\Model; | |
class NewsItem extends Model | |
{ | |
// | |
protected $table = 'news_items'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function store( Request $request ) { | |
// | |
$newsItem = new NewsItem(); | |
$newsItem->title = $request->input('title'); | |
$newsItem->content = $request->input('content'); | |
$newsItem->image = ""; | |
// sita eilute grazina prisijungusio vartotojo ID | |
// jei naudoju Auth::user(), tai virsui nepamirsti parasyti use Auth; | |
$newsItem->user_id = Auth::user()->id; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
php artisan make:auth // autentifikacijos kodo sukurimui | |
php artisan make:migration create_product_table // sukuria migracijos faila /database/migrations folderyje | |
php artisan migrate // Paleisti duombazes migracijas ir sukurti duomenu bazes struktura pagal aprasytas migracijas | |
php artisan make:controller TestController // kontrolerio sukurimas, TestController - musu kontrolerio pavadinimas. | |
failai sukuriami /app/Http/controllers folderyje | |
php artisan make:controller TestController --resource // kontrolerio sukurimas su pradiniais funkcijus aprasais, TestController - musu kontrolerio pavadinimas | |
php artisan make:model Product // sukuria modeli Product - musu modelio pavadinimas. Modeliai sukuriami /app folderyje | |
pries naudojant sukurta modeli kontroleryje reikia parasyti failo virsuje: use Product; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<svg | |
xmlns="http://www.w3.org/2000/svg" | |
xmlns:xlink="http://www.w3.org/1999/xlink"> | |
<defs> | |
<linearGradient id="textgradient" x1="0%" x2="0%" y1="0%" y2="100%"> | |
<stop stop-color="#cdb57c" offset="0%"/> | |
<stop stop-color="#66481f" offset="100%"/> | |
</linearGradient> | |
</defs> | |
<filter id="dropShadow"> |