1 |
psql -h hostname.com -p 5432 -d database_name -U database_user -W -f this-db-dmp.sql |
1 step: Create Laravel 5 Project
1 |
composer create-project laravel/laravel l5swagger |
2 step: Install Swagger Package
1 |
composer require darkaonline/l5-swagger |
Or you can install specific verion
1 |
composer require "darkaonline/l5-swagger:5.8.*" |
For use of @SWG annotation we are going to install the following package
... |
Directly run in sql
1 2 3 4 5 6 7 |
CREATE FUNCTION grade (grade_point INT) RETURNS VARCHAR(15) RETURN CASE WHEN grade_point >= 90 THEN "EXCELLENT" WHEN grade_point >= 80 THEN "GOOD" END |
Then use like
1 |
select grade (79) |
using in laravel
Method — 1
In app.module.ts:
- Add imports:
1 |
import { HashLocationStrategy, LocationStrategy } from '@angular/common'; |
And in NgMoudle provider, add:
1 |
{provide: LocationStrategy, useClass: HashLocationStrategy} |
Example (app.module.ts):
Add this line in index.html file
1 2 3 |
#toast-container > div { opacity:1; } |
1 2 3 4 5 6 7 8 9 |
<style> span { display: inline-block; width: 180px; white-space: nowrap; overflow: hidden !important; text-overflow: ellipsis; } </style> |
Lorem Ipsum is simply dummy text of the printing and typesetting industry...
if you have a script called index.php that took a parameter called slug…
1 2 3 4 5 6 7 8 9 10 11 |
<?php if (isset($_GET['slug'])) { $sql = "SELECT * FROM `your_table` WHERE slug = ? LIMIT 1"; $smt = $pdo->prepare($sql); $smt->execute(array($_GET['slug'])); $row = $smt->fetchObject(); // do something with the matching record here... } else { // display home page } |
You could then re-write requests using ...
1 2 |
<div *ngFor="let latestblog of latestblogdata; index as i" [ngClass]="(i==0)?'item active':'item'"> </div> |
1 |
{{ variable | date : "dd.MM.y" }} |