Results: 1580
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
text and password fields
<body>
	<form action="" method="get">
		username:<input type="text" name="username" maxlength="10" size="">
		password:<input type="password" name="password" maxlength="10" size="">
		
		
	</form>

</body>
by თენგიზ მაღლაფერიძე
4 years ago
0
HTML
Tutorial 45
HTML5 and CSS3 beginners tutorials
0
<body>
	<form action="" method="get">
		pick food:
		<select name="food" >
		<option value="potatuna" > potato </option>
		<option value="popcorn" > popcorn </option>
		<option value="pizza" > pizza </option>
		
		</select>
	</form>

</body>
by თენგიზ მაღლაფერიძე
4 years ago
0
HTML
Tutorial 46
HTML5 and CSS3 beginners tutorials
0
checkboxes
<form action="" method="get">
		What do you do?:
		play <input type="checkbox" name="spare_time[]" value="sport">
		Not play <input type="checkbox" name="spare_time[]" value="sport">
</form>
buttons
<br/><br/>
		Do you play?
		Yes<input type="radio" name="plays_lol" value="yes" checked="checked">
		No<input type="radio" name="plays_lol" value="No">
by თენგიზ მაღლაფერიძე
4 years ago
0
HTML
Tutorial 47
HTML5 and CSS3 beginners tutorials
0
<form action="" method="get">
	What do you do?:
	<textarea name="story"></textarea>

</form>
by თენგიზ მაღლაფერიძე
4 years ago
0
HTML
Tutorial 48
HTML5 and CSS3 beginners tutorials
0
<form action="" method="get">
		Name:<input type="text" name="name"><br/>
		Password:<input type="password" name="password"><br/>
		CheckBoxes:<br/>
		1<input type="checkbox"  value="2" name="checker">
		2<input type="checkbox" value="2" name="checker">
		<br/>
		<input type="file"/><br/>
		<input type="submit" value="submit"><br/>
		<input type="reset" value="reset">
</form>
by თენგიზ მაღლაფერიძე
4 years ago
0
HTML
Tutorial 49
HTML5 and CSS3 beginners tutorials
0
<form action="" method="get">
		<fieldset>
			<legend>Personal info:</legend>
			<label for="first_name">first name:</label><input type="text" name="first_name" id="first_name"><br/>
			<label>last name:</label><input type="text" name="last_name"><br/>
		</fieldset>
		<br/>
		<fieldset>
			<legend>Hobbies:</legend>
			<label>sport</label><input type="checkbox" value="sport">
			<label>sport</label><input type="checkbox" value="gaming">
		</fieldset>
		<br/>
		<input type="submit" value="submit">
</form>
by თენგიზ მაღლაფერიძე
4 years ago
0
HTML
Tutorial 50
HTML5 and CSS3 beginners tutorials
0
Class based model factories in Laravel 8 CODE
create a new factory for the Book model using the following Artisan command
php artisan make:factory BookFactory --model=Book
.it would generate a
 BookFactory.php
file under
database/factories 
which looks like so.
<?php

namespace Database\Factories;

use App\Models\Book;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;

class BookFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = Book::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            //
        ];
    }
}
define the definition method like so.
public function definition()
{
    return [
        'title' => $this->faker->name,
        'author' => $this->faker->name,
        'published' => 1
    ];
}
Using the factories Once the
BookFactory 
is created, it’s now ready to be used. For instance, we can use it in the
database/seeders/DatabaseSeeder.php
class like so.
<?php

namespace Database\Seeders;

use App\Models\Book;
use App\Models\User;
use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     *
     * @return void
     */
    public function run()
    {
        Book::factory(5)->create();
    }
}
Notice, you can now directly use the factory on the model instance (App\Models\Book in this case) that is because when you create a model using the
php artisan make:model Book
Artisan command in Laravel 8, it generates the model which includes the new
HasFactory
trait. So, our Book model looks like so.
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Book extends Model
{
    use HasFactory;
}
by გიორგი ბაკაშვილი
4 years ago
0
Laravel
Factory
0
set and get global variables
Set an global variable
allowedMilliseconds
with value
100
pm.global.set("allowedMilliseconds", 100);
Get the global variable
pm.global.get("allowedMilliseconds")
The global variable in real use case. In this example response time is checked to be below 100ms
pm.test("Response time is less than "+pm.global.get("allowedMilliseconds")+"ms", function () {
    pm.expect(pm.response.responseTime).to.be.below(pm.global.get("allowedMilliseconds"));
});
by Valeri Tandilashvili
4 years ago
0
Postman
test automation
0
set and get environment variables
Set an environment variable
allowedMilliseconds
with value
100
pm.environment.set("allowedMilliseconds", 100);
Get the environment variable
pm.environment.get("allowedMilliseconds")
The environment variable in real use case. In this example response time is checked to be below 100ms
pm.test("Response time is less than "+pm.environment.get("allowedMilliseconds")+"ms", function () {
    pm.expect(pm.response.responseTime).to.be.below(pm.environment.get("allowedMilliseconds"));
});
by Valeri Tandilashvili
4 years ago
0
Postman
test automation
0
check the response JSON key value
Tests that the value of
code
key is equal to
400
pm.test("status code is equal to invalid HTTP request", function () {
    var jsonData = pm.response.json();
    pm.expect(jsonData.status.code).to.eql(400);
});
The response JSON
{
    "status": {
        "code": 400,
        "text": "Mobile Number is required"
    }
}
by Valeri Tandilashvili
4 years ago
0
Postman
postman tests
0
Results: 1580