Skip to content

Instantly share code, notes, and snippets.

View robertnicjoo's full-sized avatar
🏠
Working from home

Robert Nicjoo robertnicjoo

🏠
Working from home
View GitHub Profile
@robertnicjoo
robertnicjoo / telegram-instant-view-template-help
Created February 11, 2022 04:16 — forked from HoussenMoshine/telegram-instant-view-template-help
Help for Telegram Instant View Template
# To remove only some text on a content
@remove: //p[self::p/strong[contains(text(), "Articles liés")]]
@remove: //iframe[contains(@src,"https://urlsomething")]
# To deal with fucking error of <img> is not supported in blabla
@before_el(./..): //a/img
@before_el(./..): //p/img
@robertnicjoo
robertnicjoo / AddSell.vue
Last active June 2, 2020 08:11
Sells page with VueJs 2
<template>
<div>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>Sells</span>
<router-link to="/dashboard/sells" class="float-right">Back</router-link>
</div>
<el-form ref="form" :model="form" label-width="120px" enctype="multipart/form-data">
<table class="table table-bordered table-striped table-hover">
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\School;
use App\SchoolSemester;
use App\SemesterClass;
@robertnicjoo
robertnicjoo / foreach_limit.blade.php
Created February 18, 2018 15:05 — forked from ericlbarnes/foreach_limit.blade.php
Limit a foreach with Laravel blade
@foreach (array_slice($posts->toArray(), 0, 5) as $post)
<h1>{{ $post['title'] }}</h1>
@endforeach
@robertnicjoo
robertnicjoo / finder.php
Created February 7, 2018 02:03
finder function
$post = $request->all(); //Initialize the request
$test = DB::table('products')
->where('subcategory_id','=',$post['subcategory_id']);
if(isset($post['specification_id']) && !(isset($post['brand_id'])))
{
$query = $query->where('subspecification_id','=',$post['specification_id']);
}
elseif(!(isset($post['specification_id'])) && isset($post['brand_id']))
{
@robertnicjoo
robertnicjoo / Image.php
Last active December 5, 2017 04:58
Laravel + DropzoneJs
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Image extends Model
{
protected $fillable = ['name'];
@robertnicjoo
robertnicjoo / attachment.php
Created November 13, 2017 09:11
Laravel with Dropzone.js
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Attachment extends Model
{
protected $guarded = [];
protected $appends = ['url'];