Saturday, January 9, 2021

C# Desktop Application Development




you can join the discussion on Youtube  https://youtu.be/PtSwdPoC-3A

also can ask for franchise over fiverr https://www.fiverr.com/s2/36b3fc8a5f

Saturday, November 7, 2020

New Fetures in Laravel 8

 


1. app/Models Directory

The artisan:make model command will create the model in the app/Models directory. This feature was decided after Taylor asked people on Twitter how they feel about this.


2. New Landing Page

Laravel 8 comes with a new landing page for a brand new install. It is now redesigned and It is built using TailwindCSS, includes light and dark-mode capabilities, and by default extends links to SaaS products and community sites.


3. Controllers Routing Namespacing

No more double prefix issues! In previous versions of Laravel, the RouteServiceProvider had an attribute called namespace that was used to prefix the controllers in the routes files. That created a problem when you were trying to use a callable syntax on your controllers, causing Laravel to mistakenly double prefix it for you. This attribute was removed and now you can import and use it without the issue.

It can also be used for single action controllers that have the __invoke method.


4. Route Caching

Laravel uses route caching to compile your routes in a PHP array that is more efficient to deal with. In Laravel 8, it’s possible to use this feature even if you have closures as actions to your routes. This should extend the usage of route caching for improved performance.


5. Attributes on Extended Blade Components

In Laravel 7 the child components didn’t have access to the $attributes passed to it. In Laravel 8 these components were enhanced and it is now possible to merge nested component attributes. This makes it easier to create extended components.


6. Better Syntax for Event Listening

In the previous versions of Laravel, when creating a closure based event listener there was much repetition and a cumbersome syntax.


7. Queueable Anonymous Event Listeners

In Laravel 8 it is possible to create queueable closure from anywhere in the code. This will create a queue of anonymous event listeners that will get executed in the background. This feature makes it easier to do this, while in previous versions of Laravel you would need to use an event class and an event listener (using the ShouldQueue trait).


8. Maintenance Mode


This is especially useful when you need to do some maintenance on your application and you want to take it down for your users but still let your developers investigate bugs. This will create a secret cookie that will be granted to whoever hits the correct endpoint, allowing it to use the application while in maintenance mode.


Pre-rendering an error view is a safe way for not exposing errors to your end user when your application is down (during a new deployment, for example). The Laravel 8 framework guarantees that your predefined error page will be displayed before everything else from the application.


This combines the new features and will make the application only display a single predefined route, while still allowing for the people who have the secret to test and debug. This can be very useful when launching a new app.


9. Model Factories

Model factories are class based factories that add a lot of new features to Laravel 8. For each model there’s also a factory class, where there is a definition method that says which attributes it will generate for that model. Your models make use of that factory through the Factory trait.


10. Laravel Jetstream

Laravel Jetstream is a brand new scaffolding for Laravel released as an open-source package. It builds an application using TailwindCSS and TailwindUI, includes login, registration, two-factor authentication, session management. It offers two versions for handling frontend: Livewire (TALL Stack) or InertiaJS (VueJS).

Thursday, November 5, 2020

Animation of Solar System - Blender 2.90


About Blender

    Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline—modeling, rigging, animation, simulation, rendering, compositing and motion tracking, video editing and 2D animation pipeline.

Basics 

         1. 3D Modeling

         2. Animation

         3. Rigging

Basic Tutorials (Sinhala)

1. Animation fundamentals  - https://youtu.be/G0kHQvDt4x0

2. 3D Modeling part -1 -  https://youtu.be/bzlMUZrLRWw

3. 3D Modeling part -2 - https://youtu.be/6Hez7qMjGWY

4. 3D Modeling part -2 - https://youtu.be/ZrsxHKkX93Y


Solar System Animation


Preview





SS on Rendering Period






sinhala explanation 👇


https://youtu.be/ReuxbxamAD4

Wednesday, November 4, 2020

Laravel form Validation (Laravel 8)

Laravel form Validation

output
























Steps To Follow👇


.env file


DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=forms
DB_USERNAME=root
DB_PASSWORD=toor


resources/views/layouts/app.blade.php

<!DOCTYPE html>
<html>

<head>
<title>My Form - @yield('title')</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>

</head>

<body>
@section('sidebar')
<h2 class="text-center bg-success">This is the master sidebar.</h2>
@show

<div class="container">
@yield('content')
</div>
</body>
</html>

resources/views/form1.blade.php

@extends('layouts.app')

@section('title','my first form')


@section('sidebar')
@parent
<div class="navbar ">
<p class="glyphicon-align-middle text-center text-primary">Hi this sde bar...Look below</p>
</div>

@endsection

@section('content')


<div class="form-horizontal " >
{{-- this will display error message if any error found--}}
@if ($errors->any())
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif


{{-- this is form--}}

<form action={{ url('/form') }} method="post">
@csrf
<div class="form-group">
<labale for="c_name">Name</labale>
<input type="text" name="c_name" class="form-control @error('c_name') is-invalid @enderror"
placeholder="please enter name here"><br>

{{-- this will run if user inputs a invalid data--}}
@error('c_name')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
</div>
<div class="form-group">
<labale for="c_address">address</labale>
<input type="text" id="c_province" name="c_address"
class="form-control @error('c_address') is-invalid @enderror"
placeholder="please enter address"><br>
{{-- this will run if user inputs a invalid data--}}
@error('c_address')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
</div>

<div class="form-group">
<labale for="c_province">province</labale>
<input type="text" id="c_province" name="c_province" class="form-control"
placeholder="please enter the province"><br>
{{-- this will run if user inputs a invalid data--}}
@error('c_province')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
</div>

<div class="form-group">
<input type="submit" value="Enter!" name="sub_btn" class="btn btn-default">
</div>

</form>
</div>
@endsection


app/Http/controllers/MyController.php


<?php

namespace App\Http\Controllers;

use App\Models\Myform;
use Illuminate\Http\Request;

class MyController extends Controller
{
//this is for show the form

public function show_form(){

return view('form1');

}

// this method/function for save data

public function save_data(Request $request){

//this is validation of input data set
$this->validate($request,[
'c_name'=>'required',
'c_address'=>'required',
'c_province'=>'required'
]);

//this is for insert data in to database

Myform::create($request->all());

return back();

}

}


routes/web.php


<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
return view('welcome');
});


//routes for form
Route::get('/form','App\Http\Controllers\MyController@show_form');
Route::post('/form','App\Http\Controllers\MyController@save_data');


 Thank you..


Saturday, October 31, 2020

What is Laravel ?

Laravel is a PHP framework which was introduced for the web artisans.Now a days it's a popular framework among the students as well as the enterprise level developers, since it's more described and meaningful framework.Taylor Otwell, the writer of the framework is more innovative rather than other colleagues in his time in higher education.He was thought to write a framework instead of writing an applications which were done by other colleagues.

                    MVC architecture has been become a very popular concept since the start of 21st century.By the definition M stands for MODEL ,V stands for VIEW and C stands for CONTROLLER.This three components are determined the whole system/project (an application or a software).The model represents the database.The view represents the rendering output that means the human-interacted interface and the controller represents the logical functionality of the software.