Skip to content

Instantly share code, notes, and snippets.

View pradeeprjth's full-sized avatar
🎯
Focusing

Pradeep pradeeprjth

🎯
Focusing
  • Cotocus.com
View GitHub Profile
<html>
<head>
<title>Writing PHP Function</title>
</head>
<body>
<?php
/* Defining a PHP Function */
@pradeeprjth
pradeeprjth / html
Last active January 28, 2020 12:45
public function up()
{
Schema::create('books', function (Blueprint $table) {
...
$table->string('filename')->nullable();
$table->string('mime')->nullable();
$table->string('original_filename')->nullable();
...
});
}
<html>
<head>
<title>jQuery Syntax Example</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript">
<form action="{{route('sendemail')}}" enctype="multipart/form-data" method="POST">
<h1>We Will Contact You</h1><span class="lnr lnr-heart"></span>
@if ($errors->any())
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Messages\SlackMessage;
class TestNotification extends Notification {
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Notifications\Notification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Messages\SlackMessage;
<form name="_token" action="{{ route('bookings.toursDropDown', $tour->id) }}" id="tour-dropdown" method="get" value="<?php echo csrf_token(); ?>">
{!! csrf_field() !!}
<select id="tour">
<option value="">All</option>
@foreach ($tours as $tour)
<option value="{!! $tour->id !!}">{!! $tour->name !!}</option>
@endforeach
</select>
</form>
</td>
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use DB;
class DropdownController extends Controller
{
public function index()
void initiateFacebookLogin() async {
var facebookLogin = FacebookLogin();
var facebookLoginResult =
await facebookLogin.logInWithReadPermissions(['email']);
switch (facebookLoginResult.status) {
case FacebookLoginStatus.error:
print("Error");
onLoginStatusChanged(false);
break;
case FacebookLoginStatus.cancelledByUser:
bool isLoggedIn = false;
void onLoginStatusChanged(bool isLoggedIn) {
setState(() {
this.isLoggedIn = isLoggedIn;
});
}
@override
Widget build(BuildContext context) {