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
| // Generates a URL-friendly "slug" from a provided string. | |
| // For example: "This Is Great!!!" transforms into "this-is-great" | |
| function generateSlug (value) { | |
| // 1) convert to lowercase | |
| // 2) remove dashes and pluses | |
| // 3) replace spaces with dashes | |
| // 4) remove everything but alphanumeric characters and dashes | |
| return value.toLowerCase().replace(/-+/g, '').replace(/\s+/g, '-').replace(/[^a-z0-9-]/g, ''); | |
| }; |
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
| Route::get('/csv', function() { | |
| $table = ApplyOnline::all(); | |
| $output = "Company Name,Company Address,Product Lineup,Name of Company Owner,Address of Company Owner,NID of Authorized Person,Company Trade License No,Company TIN No,Contact No,Repersentative,Email,Website\n"; | |
| $count= 0; | |
| foreach ($table as $data) { | |
| $output.= $data->companyname.","; | |
| $output.= $data->companyaddress.","; | |
| $output.= $data->lineup.","; | |
| $output.= $data->companyowner.","; |
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
| Linux - create "Default (Linux).sublime-mousemap" in ~/.config/sublime-text-3/Packages/User | |
| Mac - create "Default (OSX).sublime-mousemap" in ~/Library/Application Support/Sublime Text 3/Packages/User | |
| Win - create "Default (Windows).sublime-mousemap" in %appdata%\Sublime Text 3\Packages\User | |
| [ | |
| { | |
| "button": "button1", | |
| "count": 1, | |
| "modifiers": ["ctrl"], | |
| "press_command": "drag_select", |
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 fileView($id){ | |
| $photo_object =Notice::findOrFail($id); | |
| $headers = array('Content-Type' => 'pdf'); | |
| $response = \Response::download(public_path('notice_uploads/'.$photo_object->file), $photo_object->file, $headers); | |
| ob_end_clean(); | |
| return $response; | |
| } |
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
| In Blade.php | |
| {!! Form::open(['url' => 'product', 'method' => 'POST', 'class'=>'dropzone','id'=>'dropzone_file_upload']) !!} | |
| <!-- text input --> | |
| <div class="form-group"> | |
| <label>Product Title</label> | |
| <input type="text" required name="title" class="form-control" placeholder="Enter ..."> | |
| </div> | |
| <!-- textarea --> |
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\Exceptions; | |
| use Exception; | |
| use Symfony\Component\HttpKernel\Exception\HttpException; | |
| use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; | |
| class Handler extends ExceptionHandler | |
| { |